From 0895ac7b0dd40d17e65947cef7e4888c0d390b05 Mon Sep 17 00:00:00 2001 From: Olof Hagsand Date: Thu, 10 Oct 2019 20:38:08 +0000 Subject: [PATCH] memleak --- lib/src/clixon_datastore_write.c | 2 ++ lib/src/clixon_xml_nsctx.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/clixon_datastore_write.c b/lib/src/clixon_datastore_write.c index f49714f4..3f4ef5c7 100644 --- a/lib/src/clixon_datastore_write.c +++ b/lib/src/clixon_datastore_write.c @@ -737,6 +737,8 @@ text_modify(clicon_handle h, } /* else Y_CONTAINER */ retval = 1; done: + if (nscx1) + xml_nsctx_free(nscx1); /* Remove dangling added objects */ if (changed && x0 && xml_parent(x0)==NULL) xml_purge(x0); diff --git a/lib/src/clixon_xml_nsctx.c b/lib/src/clixon_xml_nsctx.c index c7f803a4..c65cab5b 100644 --- a/lib/src/clixon_xml_nsctx.c +++ b/lib/src/clixon_xml_nsctx.c @@ -248,7 +248,7 @@ xml_nsctx_node1(cxobj *xn, * xml_nsctx_free(nsc) * @endcode * @see xml_nsctx_init - * @see xml_nsctx_free Free the reutned handle + * @see xml_nsctx_free Free the returned handle */ int xml_nsctx_node(cxobj *xn,