diff options
Diffstat (limited to '')
-rw-r--r-- | libaxl_context_free.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libaxl_context_free.c b/libaxl_context_free.c new file mode 100644 index 0000000..c86f9de --- /dev/null +++ b/libaxl_context_free.c @@ -0,0 +1,12 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + +void +libaxl_context_free(LIBAXL_CONTEXT *ctx) +{ + if (ctx && !--ctx->refcount) { + free(ctx->out_buf); + free(ctx->in_buf); + free(ctx); + } +} |