All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xl: free default_{vifscript, bridge, gatewaydev} on exit
@ 2013-06-12 12:38 Ian Campbell
  2013-06-12 12:41 ` Ian Jackson
  2013-06-12 13:19 ` George Dunlap
  0 siblings, 2 replies; 5+ messages in thread
From: Ian Campbell @ 2013-06-12 12:38 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson, Ian Campbell, George.Dunlap

These leaks aren't serious, since they are only in xl but this makes "xl list"
clean according to valgrind, which is useful from the point of view of
eliminating false positives when looking at the state of libxl (where leaks
matter).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: George.Dunlap@citrix.com
---

I'm inclined to suggest that these are 4.4 material.
---
 tools/libxl/xl.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c
index 3c141bf..0f3acb9 100644
--- a/tools/libxl/xl.c
+++ b/tools/libxl/xl.c
@@ -276,6 +276,21 @@ static void xl_ctx_free(void)
         free(lockfile);
         lockfile = NULL;
     }
+
+    if (default_vifscript) {
+        free(default_vifscript);
+        default_vifscript = NULL;
+    }
+
+    if (default_bridge) {
+        free(default_bridge);
+        default_bridge = NULL;
+    }
+
+    if (default_gatewaydev) {
+        free(default_gatewaydev);
+        default_gatewaydev = NULL;
+    }
 }
 
 int main(int argc, char **argv)
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-27  8:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-12 12:38 [PATCH] xl: free default_{vifscript, bridge, gatewaydev} on exit Ian Campbell
2013-06-12 12:41 ` Ian Jackson
2013-06-12 13:08   ` Ian Campbell
2013-06-12 13:19 ` George Dunlap
2013-06-27  8:50   ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.