mirror of
https://github.com/antirez/aocla
synced 2024-12-27 09:58:32 +01:00
Fix a few memory leaks.
This commit is contained in:
parent
b0a58b4236
commit
54807bb9fc
1 changed files with 4 additions and 0 deletions
4
aocla.c
4
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue