aboutsummaryrefslogtreecommitdiffstats
path: root/local.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2015-08-06 14:09:58 +0000
committerTatsuya Kinoshita <tats@debian.org>2015-08-06 14:09:58 +0000
commit7834d34636db11b518444dd9ef005f42f6f1cb14 (patch)
tree457f676d4af7b0657f232f205ad62c54f39b20d2 /local.c
parentUpdate ChangeLog (diff)
parentStrnew_charp and co do not modify the char* input (diff)
downloadw3m-7834d34636db11b518444dd9ef005f42f6f1cb14.tar.gz
w3m-7834d34636db11b518444dd9ef005f42f6f1cb14.zip
Merge pull request #6 from richq/static-checks
Static checks
Diffstat (limited to '')
-rw-r--r--local.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/local.c b/local.c
index 9428319..2728627 100644
--- a/local.c
+++ b/local.c
@@ -386,9 +386,11 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
cgi_basename = mybasename(file);
pid = open_pipe_rw(&fr, NULL);
/* Don't invoke gc after here, or the program might crash in some platforms */
- if (pid < 0)
+ if (pid < 0) {
+ if (fw)
+ fclose(fw);
return NULL;
- else if (pid) {
+ } else if (pid) {
if (fw)
fclose(fw);
return fr;