projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
142e226
)
fix memory leak in err.c
author
Bodo Möller
<bodo@openssl.org>
Mon, 12 Mar 2001 18:39:47 +0000
(18:39 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Mon, 12 Mar 2001 18:39:47 +0000
(18:39 +0000)
CHANGES
patch
|
blob
|
history
crypto/err/err.c
patch
|
blob
|
history
diff --git
a/CHANGES
b/CHANGES
index fb3e069d579da6944e229d82a227507b72238522..b2075c769e7c0e743368c73459894ab9421c4c6f 100644
(file)
--- a/
CHANGES
+++ b/
CHANGES
@@
-4,6
+4,9
@@
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
did not exist.
[Bodo Moeller]
diff --git
a/crypto/err/err.c
b/crypto/err/err.c
index bfecb86c754b65b23cfd8fe98337cdd68700217a..74242b62fc2108f8a414158a66c30a8c1f73d285 100644
(file)
--- a/
crypto/err/err.c
+++ b/
crypto/err/err.c
@@
-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)
{