cli: die if we can't allocate memory

Signed-off-by: Michael Leibowitz <michael.leibowitz@intel.com>