[PATCH 4.9 21/33] libsubcmd: Fix use-after-free for realloc(..., 0)