]> granicus.if.org Git - jq/commitdiff
Fix double-free typo in print_error()
authorNicolas Williams <nico@cryptonector.com>
Sat, 7 Dec 2013 05:25:06 +0000 (23:25 -0600)
committerNicolas Williams <nico@cryptonector.com>
Sat, 7 Dec 2013 05:25:06 +0000 (23:25 -0600)
execute.c

index 4ed20d8d04655b90c17d1acc86779a398344da00..ef727dc33780b5aa8050f5eff3c4969822fdd081 100644 (file)
--- a/execute.c
+++ b/execute.c
@@ -259,7 +259,7 @@ static void print_error(jq_state *jq, jv value) {
     fprintf(stderr, "%s\n", jv_string_value(msg2));
   else
     fprintf(stderr, "jq: error: %s\n", strerror(ENOMEM));
-  jv_free(msg);
+  jv_free(msg2);
 }
 #define ON_BACKTRACK(op) ((op)+NUM_OPCODES)