]> git.ipfire.org Git - thirdparty/u-boot.git/commit
tools: Handle realloc failure in strlist_add
authorFrancois Berder <fberder@outlook.fr>
Mon, 19 Jan 2026 14:49:06 +0000 (15:49 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 28 Jan 2026 20:41:21 +0000 (14:41 -0600)
commit3a53a03f50118e329a0f38bd28ea5f7d8e22147a
treed8a4e5d6f43680630456396952642090f07726aa
parentb8a820ac98fda6005ae131d89026c60bf7c9c535
tools: Handle realloc failure in strlist_add

If realloc fails, list->strings was set to NULL and
it would create a leak. This commit ensures that if we cannot
add a string to the list, the list stays in a good state.

Signed-off-by: Francois Berder <fberder@outlook.fr>
tools/image-host.c