Drop assert in zrealloc and raise runtime error
Most assert in code are useful because they signal a real bug. However,
if allocation on the heap fails, it is a runtime error because system
gets rid of memory. This is more important on embedded systems,
and the caller process cannot exit but it should be informed with return
code and it will decide how to work on.
This drop the assert clause and add error code handling when zrealloc is
called. Because realloc does not touch the original pointer if fails, it
frees memory to avoid leaks.
Signed-off-by: Stefano Babic <sbabic@denx.de>