projects
/
tinc
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Move repeating MIN/MAX macros into dropin.h.
[tinc]
/
src
/
cipher.c
1
#include "cipher.h"
2
#include "xalloc.h"
3
4
#ifndef DISABLE_LEGACY
5
6
cipher_t *cipher_alloc() {
7
return xzalloc(sizeof(cipher_t));
8
}
9
10
void cipher_free(cipher_t **cipher) {
11
if(cipher && *cipher) {
12
cipher_close(*cipher);
13
free(*cipher);
14
*cipher = NULL;
15
}
16
}
17
18
#endif // DISABLE_LEGACY