From 7d6d4066dd2fdedae90ce3498b8f5a4702dffaa7 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 24 Mar 2015 15:05:06 -0500 Subject: [PATCH] Tweak fix for #719 --- main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index a79825fb..d00e1883 100644 --- a/main.c +++ b/main.c @@ -477,15 +477,13 @@ int main(int argc, char* argv[]) { if (jq_util_input_open_errors(input_state) != 0) ret = 2; +out: + /* XXX We really should catch ENOSPC and such errors in jv_dumpf()! */ if (fclose(stdout)!=0) { fprintf(stderr,"Error: writing output failed: %s\n", strerror(errno)); ret = 2; } - if (ret != 0) - goto out; - -out: jq_util_input_free(&input_state); jq_teardown(&jq); if (ret >= 10 && (options & EXIT_STATUS))