]> granicus.if.org Git - jq/commitdiff
Plug a memory leak in jv_object_merge
authorStephen Dolan <mu@netsoc.tcd.ie>
Mon, 10 Sep 2012 14:08:39 +0000 (15:08 +0100)
committerStephen Dolan <mu@netsoc.tcd.ie>
Mon, 10 Sep 2012 14:08:58 +0000 (15:08 +0100)
c/jv.c

diff --git a/c/jv.c b/c/jv.c
index be50c6f6c64ac7f5df763e2efc7d56a8c3c5d1e6..53e2ef7d86fb5556c15e1fe8f843de21146d793e 100644 (file)
--- a/c/jv.c
+++ b/c/jv.c
@@ -768,6 +768,7 @@ jv jv_object_merge(jv a, jv b) {
                       jv_object_iter_key(b, i),
                       jv_object_iter_value(b, i));
   }
+  jv_free(b);
   return a;
 }