]> granicus.if.org Git - jq/commitdiff
test for losing memory on compile errors 231/head
authorDavid R. MacIver <david@drmaciver.com>
Sun, 8 Dec 2013 16:19:12 +0000 (16:19 +0000)
committerDavid R. MacIver <david@drmaciver.com>
Sun, 8 Dec 2013 16:19:12 +0000 (16:19 +0000)
jq_test.c

index f10a258a4d375a5e0f977ce4632b47d99c8c334d..b6220c70d554992ee1799341ce47e51f19951394 100644 (file)
--- a/jq_test.c
+++ b/jq_test.c
@@ -248,4 +248,11 @@ static void jv_test() {
 
     jv_free(o2);
   }
+
+  /// Compile errors
+  {
+    jq_state *jq = jq_init();
+    jq_compile_args(jq, "}", jv_array());
+    jq_teardown(&jq);
+  }
 }