projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc301cc
)
Session serialiser's buffer should not be talloced (alloced and freed in the same...
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Fri, 20 Jun 2014 08:17:15 +0000
(09:17 +0100)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Fri, 20 Jun 2014 08:17:53 +0000
(09:17 +0100)
src/main/tls.c
patch
|
blob
|
history
diff --git
a/src/main/tls.c
b/src/main/tls.c
index
640bed4
..
6b626d3
100644
(file)
--- a/
src/main/tls.c
+++ b/
src/main/tls.c
@@
-1015,8
+1015,10
@@
static int cbtls_new_session(SSL *ssl, SSL_SESSION *sess)
return 0;
}
+
+ /* Do not convert to TALLOC - Thread safety */
/* alloc and convert to ASN.1 */
- sess_blob =
talloc_array(conf, unsigned char,
blob_len);
+ sess_blob =
malloc(
blob_len);
if (!sess_blob) {
DEBUG2(" SSL: could not allocate buffer len=%d to persist session", blob_len);
return 0;
@@
-1055,7
+1057,7
@@
static int cbtls_new_session(SSL *ssl, SSL_SESSION *sess)
}
error:
-
if (sess_blob) talloc_
free(sess_blob);
+ free(sess_blob);
return 0;
}