From: Ján Tomko Date: Fri, 12 Apr 2013 15:30:56 +0000 (+0200) Subject: daemon: fix leak after listing all volumes X-Git-Tag: v0.10.2.5~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f2eda0da9efd25b280c23a5a0d0fdf46f0c3c67;p=thirdparty%2Flibvirt.git daemon: fix leak after listing all volumes 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) --- diff --git a/daemon/remote.c b/daemon/remote.c index 35411f150f..4b89df3f39 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -4212,6 +4212,8 @@ cleanup: virStorageVolFree(vols[i]); VIR_FREE(vols); } + if (pool) + virStoragePoolFree(pool); return rv; }