sandbox: avoid memory leak in os_dirent_ls
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 21 Sep 2017 10:56:07 +0000 (12:56 +0200)
committerSimon Glass <sjg@chromium.org>
Mon, 9 Oct 2017 02:41:09 +0000 (20:41 -0600)
commit04d0da51578e12bd7c490aa70ed581ee5f9dcfea
treec324ac6525838f841514c974dca046fc675b31ff
parent68a345294ac74505f17d65b003a7de836b3d9cba
sandbox: avoid memory leak in os_dirent_ls

Realloc does not free the old memory area if it fails.

Identified by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/os.c