bugfix: recent patch to fix small memory leak could cause invalid free.

This could only happen during config file parsing.
This commit is contained in:
Rainer Gerhards 2010-03-16 17:02:49 +01:00
parent 4cb3e80152
commit 219336ec5a
3 changed files with 6 additions and 4 deletions

View File

@ -20,6 +20,8 @@ Version 4.6.2 [v4-stable] (rgerhards), 2010-03-??
in proper retries.
- bugfix: $omfileFlushOnTXEnd was turned on when set to off and vice
versa due to an invalid check
- bugfix: recent patch to fix small memory leak could cause invalid free.
This could only happen during config file parsing.
- bugfix(minor): handling of extremely large strings in dbgprintf() fixed
Previously, it could lead to garbagge output and, in extreme cases, also
to segfaults. Note: this was a problem only when debug output was

View File

@ -377,7 +377,7 @@ CODESTARTtryResume
ENDtryResume
BEGINdoAction
char *psz; /* temporary buffering */
char *psz = NULL; /* temporary buffering */
register unsigned l;
int iMaxLine;
CODESTARTdoAction
@ -454,7 +454,7 @@ CODESTARTdoAction
}
finalize_it:
# ifdef USE_NETZIP
if(psz != (char*) ppString[0]) {
if((psz != NULL) && (psz != (char*) ppString[0])) {
/* we need to free temporary buffer, alloced above - Naoya Nakazawa, 2010-01-11 */
free(psz);
}

View File

@ -411,7 +411,7 @@ CODESTARTtryResume
ENDtryResume
BEGINdoAction
char *psz; /* temporary buffering */
char *psz = NULL; /* temporary buffering */
register unsigned l;
int iMaxLine;
CODESTARTdoAction
@ -487,7 +487,7 @@ CODESTARTdoAction
}
finalize_it:
# ifdef USE_NETZIP
if(psz != (char*) ppString[0]) {
if((psz != NULL) && (psz != (char*) ppString[0])) {
/* we need to free temporary buffer, alloced above - Naoya Nakazawa, 2010-01-11 */
free(psz);
}