qga: fix 'driver' leak in guest-get-fsinfo
'driver' is leaked when the loop is not broken.
Leak introduced by commit 743c71d03c
,
spotted by ASAN.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
parent
102ad0a80f
commit
bb23a7362a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user