projects
/
libradsec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c739469
)
Avoid potential double free.
author
Linus Nordberg
<linus@nordu.net>
Sun, 13 Mar 2011 23:45:18 +0000
(
00:45
+0100)
committer
Linus Nordberg
<linus@nordu.net>
Sun, 13 Mar 2011 23:45:18 +0000
(
00:45
+0100)
(udp_init): Set conn.rev = NULL in fault case.
lib/udp.c
patch
|
blob
|
history
diff --git
a/lib/udp.c
b/lib/udp.c
index
911616d
..
c04821d
100644
(file)
--- a/
lib/udp.c
+++ b/
lib/udp.c
@@
-155,7
+155,10
@@
udp_init (struct rs_connection *conn, struct rs_packet *pkt)
if (!conn->rev || !conn->wev)
{
if (conn->rev)
- event_free (conn->rev);
+ {
+ event_free (conn->rev);
+ conn->rev = NULL;
+ }
/* ENOMEM _or_ EINVAL but EINVAL only if we use EV_SIGNAL, at
least for now (libevent-2.0.5). */
return rs_err_conn_push_fl (conn, RSE_NOMEM, __FILE__, __LINE__, NULL);