From 54807bb9fc9e99cc87ec2343ea32becbc56c6e7a Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 21 Dec 2022 09:05:52 +0100 Subject: [PATCH] Fix a few memory leaks. --- aocla.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aocla.c b/aocla.c index f5fe23f..31fbf5f 100644 --- a/aocla.c +++ b/aocla.c @@ -632,6 +632,8 @@ int procBasicMath(aoclactx *ctx) { if (fname[0] == '*' && fname[1] == 0) res = a->i * b->i; if (fname[0] == '/' && fname[1] == 0) res = a->i / b->i; stackPush(ctx,newInt(res)); + release(a); + release(b); return 0; } @@ -664,6 +666,8 @@ int procCompare(aoclactx *ctx) { } } stackPush(ctx,newBool(res)); + release(a); + release(b); return 0; }