projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39f6d59
)
Only free members of connection_t that have been allocated.
author
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 12 Mar 2007 17:55:43 +0000
(17:55 +0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 12 Mar 2007 17:55:43 +0000
(17:55 +0000)
src/connection.c
patch
|
blob
|
history
diff --git
a/src/connection.c
b/src/connection.c
index 1f2f96cc0aca244fda4bf71d31e9d8f13f6a4bd4..b6ce517e152cb69570c13c1a41f5f4320fb8daf4 100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-79,15
+79,25
@@
void free_connection(connection_t *c)
{
cp();
- if(c) {
+ if(!c)
+ return;
+
+ if(c->hostname)
free(c->hostname);
+
+ if(c->inkey)
free(c->inkey);
+
+ if(c->outkey)
free(c->outkey);
+
+ if(c->mychallenge)
free(c->mychallenge);
+
+ if(c->hischallenge)
free(c->hischallenge);
- event_del(&c->ev);
- }
+ event_del(&c->ev);
free(c);
}