[PATCH 4.14 26/45] libsubcmd: Fix use-after-free for realloc(..., 0)