[libvirt] [PATCH] xen_driver: don't leak a parsed-config buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Another leak:

>From 10a428a2ed1ddbe4da2b4fbd7690da5a0fe0420b Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Mon, 18 Jan 2010 18:02:17 +0100
Subject: [PATCH] xen_driver: don't leak a parsed-config buffer

* src/xen/xen_driver.c (xenUnifiedDomainXMLFromNative): Also
free "conf" before returning.
---
 src/xen/xen_driver.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 4911c9e..72f56ae 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -1,7 +1,7 @@
 /*
  * xen_driver.c: Unified Xen driver.
  *
- * Copyright (C) 2007, 2008, 2009 Red Hat, Inc.
+ * Copyright (C) 2007-2010 Red Hat, Inc.
  *
  * See COPYING.LIB for the License of this software
  *
@@ -1199,6 +1199,8 @@ xenUnifiedDomainXMLFromNative(virConnectPtr conn,

 cleanup:
     virDomainDefFree(def);
+    if (conf)
+        virConfFree(conf);
     return ret;
 }

--
1.6.6.638.g2bc54

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]