forked from enlightenment/terminology
remove weird check
After allocation of new_screen, we should check the allocation of this variable, and return if we cannot allocate. CID 1100647
This commit is contained in:
parent
839ac5b8d5
commit
fe45b5c73f
|
@ -754,10 +754,10 @@ termpty_resize(Termpty *ty, int new_w, int new_h)
|
||||||
}
|
}
|
||||||
|
|
||||||
new_screen = calloc(1, sizeof(Termcell) * new_w * new_h);
|
new_screen = calloc(1, sizeof(Termcell) * new_w * new_h);
|
||||||
if (!ty->screen)
|
if (!new_screen)
|
||||||
{
|
{
|
||||||
ty->screen2 = NULL;
|
|
||||||
ERR("memerr");
|
ERR("memerr");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
free(ty->screen2);
|
free(ty->screen2);
|
||||||
ty->screen2 = calloc(1, sizeof(Termcell) * new_w * new_h);
|
ty->screen2 = calloc(1, sizeof(Termcell) * new_w * new_h);
|
||||||
|
|
Loading…
Reference in New Issue