projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert sizeof foo to sizeof(foo).
[tinc]
/
src
/
connection.c
diff --git
a/src/connection.c
b/src/connection.c
index
9c45978
..
5fcecbd
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-48,21
+48,23
@@
void exit_connections(void) {
}
connection_t *new_connection(void) {
}
connection_t *new_connection(void) {
- return x
malloc_and_zero
(sizeof(connection_t));
+ return x
zalloc
(sizeof(connection_t));
}
void free_connection(connection_t *c) {
if(!c)
return;
}
void free_connection(connection_t *c) {
if(!c)
return;
+#ifndef DISABLE_LEGACY
cipher_close(c->incipher);
digest_close(c->indigest);
cipher_close(c->outcipher);
digest_close(c->outdigest);
cipher_close(c->incipher);
digest_close(c->indigest);
cipher_close(c->outcipher);
digest_close(c->outdigest);
+ rsa_free(c->rsa);
+#endif
sptps_stop(&c->sptps);
ecdsa_free(c->ecdsa);
sptps_stop(&c->sptps);
ecdsa_free(c->ecdsa);
- rsa_free(c->rsa);
free(c->hischallenge);
free(c->hischallenge);
@@
-96,7
+98,7
@@
bool dump_connections(connection_t *cdump) {
send_request(cdump, "%d %d %s %s %x %d %x",
CONTROL, REQ_DUMP_CONNECTIONS,
c->name, c->hostname, c->options, c->socket,
send_request(cdump, "%d %d %s %s %x %d %x",
CONTROL, REQ_DUMP_CONNECTIONS,
c->name, c->hostname, c->options, c->socket,
- bitfield_to_int(&c->status, sizeof
c->status
));
+ bitfield_to_int(&c->status, sizeof
(c->status)
));
}
return send_request(cdump, "%d %d", CONTROL, REQ_DUMP_CONNECTIONS);
}
return send_request(cdump, "%d %d", CONTROL, REQ_DUMP_CONNECTIONS);