diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-10-27 13:42:00 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-10-27 13:42:00 +0100 |
commit | 10324627c792702a94d4c3a1c53a7d8b419b114b (patch) | |
tree | a6bf4a7c95c873091ba95f3f012b9dd82b2d8907 | |
parent | cdc760c58077f44fc40adbbe41e1556a67c1b9a9 (diff) | |
download | jsonpath-10324627c792702a94d4c3a1c53a7d8b419b114b.tar.gz |
cli: prevent segfault if input file failed to open
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -444,7 +444,7 @@ out: if (jsobj) json_object_put(jsobj); - if (input != stdin) + if (input && input != stdin) fclose(input); return rv; |