summaryrefslogtreecommitdiff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2015-01-06 00:40:23 +0100
committerMikael Magnusson <mikachu@gmail.com>2015-01-06 23:51:00 +0100
commit6a5339fdd517fc59ce576cf3bbd0cd73c0edfa14 (patch)
treee007922d263cc164d70edc88acc188038a72cdc3 /Src/hist.c
parentbd2175fe7dad87575ae838fa116226aff4c18191 (diff)
downloadzsh-6a5339fdd517fc59ce576cf3bbd0cd73c0edfa14.tar.gz
zsh-6a5339fdd517fc59ce576cf3bbd0cd73c0edfa14.zip
34107: getsubsargs: free ptr1 before returning
Found by Coverity (Issue 439073).
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Src/hist.c b/Src/hist.c
index d8192c1c5..e65d78bfd 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -367,6 +367,7 @@ getsubsargs(char *subline, int *gbalp, int *cflagp)
zsfree(hsubl);
hsubl = ptr1;
} else if (!hsubl) { /* fail silently on this */
+ zsfree(ptr1);
zsfree(ptr2);
return 0;
}