WUtil: Make sure wmalloc/wrealloc won't fail because of the abort handler
commit816fa00625c45c90ffcabdcb4eb0b14b66ce396d
authorChristophe CURIS <christophe.curis@free.fr>
Sun, 16 May 2021 13:47:05 +0000 (16 15:47 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 18 May 2021 16:49:17 +0000 (18 17:49 +0100)
tree297c48432ba6688a38abcb65e693e19482a25896
parent6ebec0bb9f6fa31a0e6e542b9fb306fd65c6afdc
WUtil: Make sure wmalloc/wrealloc won't fail because of the abort handler

As pointed by Coverity (#50074), despite the expected behaviour that
'wmalloc' should never return NULL, it may still happen if an abort handler
set by user (with wsetabort) does not call exit() as expected. In such
case we make sure the NULL pointer dereference does not happen inside
WINGs code because we assume it is a known user choice.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WINGs/memory.c