Fix double free() in unit_onresize()

Introduced in commit 64a53c90.
This commit is contained in:
Markus Armbruster 2008-09-11 07:50:18 -04:00
parent 9189e67ad7
commit fe3fd39d8f

View file

@ -277,8 +277,8 @@ unit_onresize(int type)
n = ef_nelem(type);
cl = realloc(clink[type], n * sizeof(*clink[type]));
if (!cl)
return -1;
if (!cl && n)
exit_nomem();
for (i = nclink[type]; i < n; i++)
clink_init(&cl[i]);
clink[type] = cl;