Fix leak
This commit is contained in:
@ -1,3 +1,3 @@
|
||||
;; -*- mode: lisp-data -*-
|
||||
|
||||
(print ((lambda (a) a) 1))
|
||||
(print ((lambda (a b &rest r &key c &allow-other-keys) r) 1 2 :c 3 :d 4))
|
||||
|
||||
@ -432,6 +432,7 @@ push_interpreted_args_to_lexenv(LispFunction *fobj, LispVal *args) {
|
||||
LispVal *seen_kw = make_hash_table_no_gc(Qnil, Qnil);
|
||||
while (!NILP(args)) {
|
||||
if (NILP(XCDR(args))) {
|
||||
release_hash_table_no_gc(seen_kw);
|
||||
return PROCESS_ARGS_NO_KEY_VALUE;
|
||||
}
|
||||
// has index in front
|
||||
@ -440,6 +441,7 @@ push_interpreted_args_to_lexenv(LispFunction *fobj, LispVal *args) {
|
||||
Fputhash(seen_kw, XCAR(args), Qt);
|
||||
push_optional_argument_to_lexenv(XCDR(i_spec), SECOND(args));
|
||||
} else if (!fobj->args.allow_other_keys) {
|
||||
release_hash_table_no_gc(seen_kw);
|
||||
return PROCESS_ARGS_BAD_KEY;
|
||||
}
|
||||
args = XCDR(XCDR(args));
|
||||
@ -450,6 +452,7 @@ push_interpreted_args_to_lexenv(LispFunction *fobj, LispVal *args) {
|
||||
XCDR(HASH_VALUE(fobj->args.kw, i)));
|
||||
}
|
||||
}
|
||||
release_hash_table_no_gc(seen_kw);
|
||||
return PROCESS_ARGS_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user