提交 bb23a736 编写于 作者: M Marc-André Lureau 提交者: Michael Roth

qga: fix 'driver' leak in guest-get-fsinfo

'driver' is leaked when the loop is not broken.

Leak introduced by commit 743c71d0,
spotted by ASAN.
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 102ad0a8
......@@ -890,6 +890,7 @@ static void build_guest_fsinfo_for_real_device(char const *syspath,
break;
}
g_free(driver);
if (sscanf(p, "/%x:%x:%x.%x%n",
pci, pci + 1, pci + 2, pci + 3, &pcilen) == 4) {
p += pcilen;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册