From ac3af0baf1e91f9d1b06b514c968be857e69a220 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sat, 8 Jan 2022 22:09:43 +0100 Subject: [PATCH] apfl_ctx_destroy: Do nothing on NULL input --- src/eval.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/eval.c b/src/eval.c index 954cfe9..ac49051 100644 --- a/src/eval.c +++ b/src/eval.c @@ -146,6 +146,10 @@ apfl_ctx_new(void) void apfl_ctx_destroy(apfl_ctx ctx) { + if (ctx == NULL) { + return; + } + apfl_hashmap_destroy(ctx->scope); free(ctx); }