return xzalloc(sizeof(cipher_t));
}
-void cipher_free(cipher_t **cipher) {
- if(cipher && *cipher) {
- cipher_close(*cipher);
- free(*cipher);
- *cipher = NULL;
+void cipher_free(cipher_t *cipher) {
+ if(cipher) {
+ cipher_close(cipher);
+ free(cipher);
}
}