[PATCH openEuler-5.10 060/113] libsubcmd: Fix use-after-free for realloc(..., 0)