mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 12:40:42 +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;
|
return;
|
||||||
}
|
}
|
||||||
for (count = 0, e = eles->e.block.head; e; count++, e = e->next)
|
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;
|
return;
|
||||||
|
}
|
||||||
if (count > def->type->num_parms) {
|
if (count > def->type->num_parms) {
|
||||||
warning (eles, "excessive elements in initializer");
|
warning (eles, "excessive elements in initializer");
|
||||||
count = def->type->num_parms;
|
count = def->type->num_parms;
|
||||||
|
@ -2404,6 +2406,7 @@ init_elements (def_t *def, expr_t *eles)
|
||||||
error (e, "non-constant initializer");
|
error (e, "non-constant initializer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free (elements);
|
||||||
}
|
}
|
||||||
|
|
||||||
expr_t *
|
expr_t *
|
||||||
|
|
Loading…
Reference in a new issue