cli: fix realloc issue spotted by cppcheck
Cppcheck 1.90 dev reports following:
cli.c:117:4: error: Common realloc mistake: 'typestr' nulled but not freed upon failure [memleakOnRealloc]
typestr = realloc(typestr, maxlen);
^
Signed-off-by: Petr Štetiar <ynezz@true.cz>