提交 338e7c3c 编写于 作者: M Matthias Bolte

Don't free an uninitalized pointer in update_driver_name()

This invalid free results in heap corruption. Some symptoms I saw
because of this were libvirtd crashing and virt-manager hanging
while trying to enumerate devices.
上级 7679f064
......@@ -78,7 +78,7 @@ static int update_driver_name(virConnectPtr conn,
virNodeDeviceObjPtr dev)
{
char *driver_link = NULL;
char *devpath;
char *devpath = NULL;
char *p;
int ret = -1;
......@@ -114,7 +114,7 @@ static int update_driver_name(virConnectPtr conn,
cleanup:
VIR_FREE(driver_link);
free(devpath);
VIR_FREE(devpath);
return ret;
}
#else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册