projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad10dc0
)
Packet streams: fix memory leak on dlist allocation failure.
author
Kp
<kp@valhallalegends.com>
Sun, 1 Jun 2008 17:25:50 +0000
(12:25 -0500)
committer
Kp
<kp@valhallalegends.com>
Mon, 1 Sep 2008 20:13:56 +0000
(15:13 -0500)
If silc_dlist_init fails to allocate a SilcDList for stream->process,
then silc_packet_stream_link_va leaks the newly allocated
SilcPacketProcess. Fix that by calling silc_free(p) on the error path.
lib/silccore/silcpacket.c
patch
|
blob
|
history
diff --git
a/lib/silccore/silcpacket.c
b/lib/silccore/silcpacket.c
index d0445019769aa2f48a1b5d49849bc97852bb711d..df195f678075c20fb495b276977965221cebfbd0 100644
(file)
--- a/
lib/silccore/silcpacket.c
+++ b/
lib/silccore/silcpacket.c
@@
-1030,6
+1030,7
@@
static SilcBool silc_packet_stream_link_va(SilcPacketStream stream,
stream->process = silc_dlist_init();
if (!stream->process) {
silc_mutex_unlock(stream->lock);
+ silc_free(p);
return FALSE;
}
}