fixed memory leak
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
// NOTE: This data structure doesn't strictly depend on
|
||||
// the runtime, so it could be moved to src/objects.
|
||||
|
||||
#include "../utils/defs.h"
|
||||
#include "../objects/objects.h"
|
||||
|
||||
|
||||
@@ -73,7 +73,10 @@ static Object *call(Object *self, Object **argv, unsigned int argc, Heap *heap,
|
||||
argv2[i] = Object_NewNone(heap, error);
|
||||
|
||||
if(argv2[i] == NULL)
|
||||
return 0;
|
||||
{
|
||||
free(argv2);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else UNREACHABLE;
|
||||
|
||||
Reference in New Issue
Block a user