projects
/
project
/
jsonpath.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdc760c
)
cli: prevent segfault if input file failed to open
author
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 27 Oct 2015 12:42:00 +0000
(13:42 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 27 Oct 2015 12:42:00 +0000
(13:42 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 0f1a39b30c507e5a775e6dfa538e74716645e165..e4902d9c9a11744bd993be9908bb28ef9f0b1108 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-444,7
+444,7
@@
out:
if (jsobj)
json_object_put(jsobj);
- if (input != stdin)
+ if (input
&& input
!= stdin)
fclose(input);
return rv;