]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
daemon: fix leak after listing all volumes
authorJán Tomko <jtomko@redhat.com>
Fri, 12 Apr 2013 15:30:56 +0000 (17:30 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 16 May 2013 14:00:55 +0000 (16:00 +0200)
CVE-2013-1962

remoteDispatchStoragePoolListAllVolumes wasn't freeing the pool.
The pool also held a reference to the connection, preventing it from
getting freed and closing the netcf interface driver, which held two
sockets open.
(cherry picked from commit ca697e90d5bd6a6dfb94bfb6d4438bdf9a44b739)

daemon/remote.c

index 51dbd015ec5ddc630a42d6e31fcc52b0feed8760..b2f9b7a158651cd862e398e82f633a0615997e0e 100644 (file)
@@ -4233,6 +4233,8 @@ cleanup:
             virStorageVolFree(vols[i]);
         VIR_FREE(vols);
     }
+    if (pool)
+        virStoragePoolFree(pool);
     return rv;
 }