mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-25 02:32:57 +02:00
Fix SEGV.
This commit is contained in:
+5
-2
@@ -377,7 +377,7 @@ eval_userfunc(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
for (j=0; j<node->num_kids; j++) {
|
||||
DestroyValue(new_locals[j]);
|
||||
}
|
||||
if (new_locals != stack_locals) free(new_locals);
|
||||
if (new_locals != NULL && new_locals != stack_locals) free(new_locals);
|
||||
return E_RECURSIVE;
|
||||
}
|
||||
|
||||
@@ -405,7 +405,10 @@ eval_userfunc(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
for (j=0; j<node->num_kids; j++) {
|
||||
DestroyValue(new_locals[j]);
|
||||
}
|
||||
if (new_locals != stack_locals) free(new_locals);
|
||||
if (new_locals != stack_locals &&
|
||||
new_locals != NULL) {
|
||||
free(new_locals);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user