projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Properly use the timeout_initialized() macro.
[tinc]
/
src
/
connection.c
diff --git
a/src/connection.c
b/src/connection.c
index
1f2f96c
..
5cd7a74
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-1,6
+1,6
@@
/*
connection.c -- connection list management
/*
connection.c -- connection list management
- Copyright (C) 2000-200
6
Guus Sliepen <guus@tinc-vpn.org>,
+ Copyright (C) 2000-200
7
Guus Sliepen <guus@tinc-vpn.org>,
2000-2005 Ivo Timmermans
This program is free software; you can redistribute it and/or modify
2000-2005 Ivo Timmermans
This program is free software; you can redistribute it and/or modify
@@
-79,15
+79,28
@@
void free_connection(connection_t *c)
{
cp();
{
cp();
- if(c) {
+ if(!c)
+ return;
+
+ if(c->name)
+ free(c->name);
+
+ if(c->hostname)
free(c->hostname);
free(c->hostname);
+
+ if(c->inkey)
free(c->inkey);
free(c->inkey);
+
+ if(c->outkey)
free(c->outkey);
free(c->outkey);
+
+ if(c->mychallenge)
free(c->mychallenge);
free(c->mychallenge);
+
+ if(c->hischallenge)
free(c->hischallenge);
free(c->hischallenge);
- event_del(&c->ev);
- }
+ event_del(&c->ev);
free(c);
}
free(c);
}