mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
plug a memory leak
This commit is contained in:
parent
66ff0cfd4d
commit
55eb6c3ab1
1 changed files with 4 additions and 1 deletions
|
@ -2370,8 +2370,10 @@ init_elements (def_t *def, expr_t *eles)
|
|||
return;
|
||||
}
|
||||
for (count = 0, e = eles->e.block.head; e; count++, e = e->next)
|
||||
if (e->type == ex_error)
|
||||
if (e->type == ex_error) {
|
||||
free (elements);
|
||||
return;
|
||||
}
|
||||
if (count > def->type->num_parms) {
|
||||
warning (eles, "excessive elements in initializer");
|
||||
count = def->type->num_parms;
|
||||
|
@ -2404,6 +2406,7 @@ init_elements (def_t *def, expr_t *eles)
|
|||
error (e, "non-constant initializer");
|
||||
}
|
||||
}
|
||||
free (elements);
|
||||
}
|
||||
|
||||
expr_t *
|
||||
|
|
Loading…
Reference in a new issue