mark.c: check malloc return value