mirror of
https://github.com/xcat2/xNBA.git
synced 2025-02-21 04:49:56 +00:00
[settings] Avoid fetch_string_setting_copy() leaving an uninitialised pointer
For consistency with other functions in the fetch_setting() family, ensure that fetch_string_setting_copy() always initialises the pointer to the fetched setting even if fetching fails. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
e809985ca9
commit
09695f7be9
@ -632,6 +632,8 @@ int fetch_string_setting_copy ( struct settings *settings,
|
||||
int len;
|
||||
int check_len = 0;
|
||||
|
||||
*data = NULL;
|
||||
|
||||
len = fetch_setting_len ( settings, setting );
|
||||
if ( len < 0 )
|
||||
return len;
|
||||
|
Loading…
x
Reference in New Issue
Block a user