mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
When realloc() fails to allocate memory it returns NULL and the original block is left untouched. In that case return the potentially larger original block. Found using Cppcheck: [zdev/src/misc.c:1106]: (error) Memory leak: name Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Jens Remus <jremus@linux.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>