fix memory leak in err.c
This commit is contained in:
parent
142e22641e
commit
2c89d56a1d
3
CHANGES
3
CHANGES
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
Changes between 0.9.6 and 0.9.6a [xx XXX 2001]
|
Changes between 0.9.6 and 0.9.6a [xx XXX 2001]
|
||||||
|
|
||||||
|
*) Fix a memory leak in err.c: free err_data string if necessary.
|
||||||
|
[Bodo Moeller]
|
||||||
|
|
||||||
*) Implement ssl23_peek (analogous to ssl23_read), which previously
|
*) Implement ssl23_peek (analogous to ssl23_read), which previously
|
||||||
did not exist.
|
did not exist.
|
||||||
[Bodo Moeller]
|
[Bodo Moeller]
|
||||||
|
@ -462,7 +462,15 @@ static unsigned long get_error_values(int inc, const char **file, int *line,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data != NULL)
|
if (data == NULL)
|
||||||
|
{
|
||||||
|
if (inc && (es->err_data[i] != NULL) && (es->err_data_flags[i] & ERR_TXT_MALLOCED))
|
||||||
|
{
|
||||||
|
OPENSSL_free(es->err_data[i]);
|
||||||
|
es->err_data[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (es->err_data[i] == NULL)
|
if (es->err_data[i] == NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user