[PATCH 5.15 100/196] libsubcmd: Fix use-after-free for realloc(..., 0)