xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] libxl, gc: fix memory leak in libxl__strndup()
@ 2014-03-11 14:15 Lai Jiangshan
  2014-03-11 14:15 ` [PATCH 2/5] libxl: simplify libxl__dirname() Lai Jiangshan
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Lai Jiangshan @ 2014-03-11 14:15 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser, Ian Jackson, Ian Campbell, Lai Jiangshan

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
 tools/libxl/libxl_internal.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index cf17658..16b82b9 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -155,6 +155,8 @@ char *libxl__strndup(libxl__gc *gc, const char *c, size_t n)
 
     if (!s) libxl__alloc_failed(CTX, __func__, n, 1);
 
+    libxl__ptr_add(gc, s);
+
     return s;
 }
 
-- 
1.7.1

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

end of thread, other threads:[~2014-03-14  9:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-11 14:15 [PATCH 1/5] libxl, gc: fix memory leak in libxl__strndup() Lai Jiangshan
2014-03-11 14:15 ` [PATCH 2/5] libxl: simplify libxl__dirname() Lai Jiangshan
2014-03-13 16:51   ` Ian Jackson
2014-03-11 14:15 ` [PATCH 3/5] libxl: add @count to libxl_gc Lai Jiangshan
2014-03-13 16:52   ` Ian Jackson
2014-03-11 14:15 ` [PATCH 4/5] xc_save: avoid to alloc local constant string Lai Jiangshan
2014-03-13 16:55   ` Ian Jackson
2014-03-11 14:15 ` [PATCH 5/5] xc_save: simplify switch_qemu_logdirty() by use stack strings Lai Jiangshan
2014-03-13 16:54   ` Ian Jackson
2014-03-14  9:21     ` Lai Jiangshan
2014-03-13 16:50 ` [PATCH 1/5] libxl, gc: fix memory leak in libxl__strndup() Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).