diff options
author | Mattias Andrée <maandree@kth.se> | 2020-04-20 18:58:00 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-04-20 18:58:00 +0200 |
commit | da8b1c1d1baafb9cf4a0cc9a88362f161f8d1319 (patch) | |
tree | 0fb0676b127996064ccb75b695e9aaf9657ce9f1 /libaxl_context_free.c | |
download | libaxl-da8b1c1d1baafb9cf4a0cc9a88362f161f8d1319.tar.gz libaxl-da8b1c1d1baafb9cf4a0cc9a88362f161f8d1319.tar.bz2 libaxl-da8b1c1d1baafb9cf4a0cc9a88362f161f8d1319.tar.xz |
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
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); + } +} |