[libvirt] [PATCH] Fix memory leak introduced by commit 501bfad1

501bfad1 missed freeing priv->saveDir when opening the Xen unified driver failed. --- src/xen/xen_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 3786176..d2de141 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -432,6 +432,7 @@ clean: if (priv->opened[i]) drivers[i]->xenClose(conn); virMutexDestroy(&priv->lock); + VIR_FREE(priv->saveDir); VIR_FREE(priv); conn->privateData = NULL; return ret; -- 1.7.10.4

On Tue, Dec 04, 2012 at 10:42:43AM -0700, Jim Fehlig wrote:
501bfad1 missed freeing priv->saveDir when opening the Xen unified driver failed. --- src/xen/xen_driver.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 3786176..d2de141 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -432,6 +432,7 @@ clean: if (priv->opened[i]) drivers[i]->xenClose(conn); virMutexDestroy(&priv->lock); + VIR_FREE(priv->saveDir); VIR_FREE(priv); conn->privateData = NULL; return ret;
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Daniel P. Berrange wrote:
On Tue, Dec 04, 2012 at 10:42:43AM -0700, Jim Fehlig wrote:
501bfad1 missed freeing priv->saveDir when opening the Xen unified driver failed. --- src/xen/xen_driver.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 3786176..d2de141 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -432,6 +432,7 @@ clean: if (priv->opened[i]) drivers[i]->xenClose(conn); virMutexDestroy(&priv->lock); + VIR_FREE(priv->saveDir); VIR_FREE(priv); conn->privateData = NULL; return ret;
ACK
Thanks, pushed. Jim
participants (2)
-
Daniel P. Berrange
-
Jim Fehlig