From 5d4086a8d26f95b53906e2e629a59970daccb3e5 Mon Sep 17 00:00:00 2001 From: carlgsmith Date: Fri, 17 Jul 2015 16:44:35 +1200 Subject: [PATCH] Fix memory leak in get_tree Signed-off-by: Scott Parlane --- apteryx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apteryx.c b/apteryx.c index fc48e0b..57cb36a 100644 --- a/apteryx.c +++ b/apteryx.c @@ -951,7 +951,7 @@ _get_traverse (GNode* node, const char *path, int depth) /* Value or children */ if (children == NULL && value) { - APTERYX_LEAF (node, strdup (key), strdup ((char*)value)); + APTERYX_LEAF (node, strdup (key), value); } else if (children) {