mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 13:01:28 +02:00
34107: getsubsargs: free ptr1 before returning
Found by Coverity (Issue 439073).
This commit is contained in:
parent
bd2175fe7d
commit
6a5339fdd5
2 changed files with 3 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
2015-01-06 Mikael Magnusson <mikachu@gmail.com>
|
2015-01-06 Mikael Magnusson <mikachu@gmail.com>
|
||||||
|
|
||||||
|
* 34107: Src/hist.c: getsubsargs: free ptr1 before returning
|
||||||
|
|
||||||
* 34134: Src/exec.c: anon funcs: don't leak shf and related data
|
* 34134: Src/exec.c: anon funcs: don't leak shf and related data
|
||||||
|
|
||||||
* 34112: Src/builtin.c: typeset: fix leak of oldval
|
* 34112: Src/builtin.c: typeset: fix leak of oldval
|
||||||
|
|
|
@ -367,6 +367,7 @@ getsubsargs(char *subline, int *gbalp, int *cflagp)
|
||||||
zsfree(hsubl);
|
zsfree(hsubl);
|
||||||
hsubl = ptr1;
|
hsubl = ptr1;
|
||||||
} else if (!hsubl) { /* fail silently on this */
|
} else if (!hsubl) { /* fail silently on this */
|
||||||
|
zsfree(ptr1);
|
||||||
zsfree(ptr2);
|
zsfree(ptr2);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue