Check and fix of mem_grow usage

Signed-off-by: Markus Pargmann <mpargmann@allfex.org>