git://git.exim.org
/
users
/
heiko
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d20ede8
)
Expansions: avoid releasing memory used for $value in ${run }
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 16 Jan 2016 19:14:58 +0000
(19:14 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 16 Jan 2016 19:14:58 +0000
(19:14 +0000)
src/src/expand.c
patch
|
blob
|
history
diff --git
a/src/src/expand.c
b/src/src/expand.c
index 85d8c6a27c18bd5e9b76d5e0a4185f2f88ba9092..c78040ea7d29e7544ac5781e320e44a5bad2c12f 100644
(file)
--- a/
src/src/expand.c
+++ b/
src/src/expand.c
@@
-3187,7
+3187,7
@@
if (*s == '}')
}
else
{
}
else
{
- if (yes && lookup_value
!= NULL
)
+ if (yes && lookup_value)
*yieldptr = string_cat(*yieldptr, sizeptr, ptrptr, lookup_value,
Ustrlen(lookup_value));
lookup_value = save_lookup;
*yieldptr = string_cat(*yieldptr, sizeptr, ptrptr, lookup_value,
Ustrlen(lookup_value));
lookup_value = save_lookup;
@@
-4929,8
+4929,10
@@
while (*s != 0)
/* Read the pipe to get the command's output into $value (which is kept
in lookup_value). Read during execution, so that if the output exceeds
/* Read the pipe to get the command's output into $value (which is kept
in lookup_value). Read during execution, so that if the output exceeds
- the OS pipe buffer limit, we don't block forever. */
+ the OS pipe buffer limit, we don't block forever. Remember to not release
+ memory just allocated for $value. */
+ resetok = FALSE;
f = fdopen(fd_out, "rb");
sigalrm_seen = FALSE;
alarm(60);
f = fdopen(fd_out, "rb");
sigalrm_seen = FALSE;
alarm(60);