[qfcc] Fix some memory errors

Found thanks to running valgrind over qfcc through the entire build
whith -DDEBUG_QF_MEMORY.
This commit is contained in:
Bill Currie 2023-10-02 20:40:52 +09:00
parent bde35749f5
commit 4952d298ac
2 changed files with 1 additions and 2 deletions

View file

@ -725,7 +725,7 @@ method_check_params (method_t *method, const expr_t *args)
list_scatter_rev (&args->list, arg_list);
for (i = 2; i < count; i++) {
const expr_t *e = arg_list[i];
type_t *arg_type = mtype->t.func.param_types[i];
type_t *arg_type = i < param_count ? mtype->t.func.param_types[i] : 0;
type_t *t;
if (e->type == ex_compound) {

View file

@ -334,7 +334,6 @@ qfo_encode_type (type_t *type, defspace_t *space)
if (type->type_def && type->type_def->external) {
relocs = type->type_def->relocs;
free_def (type->type_def);
type->type_def = 0;
}
if (type->type_def)