summaryrefslogtreecommitdiffstats
path: root/src/core/settings.c
diff options
context:
space:
mode:
authorMichael Brown2011-03-03 18:13:44 +0100
committerMichael Brown2011-03-03 18:13:44 +0100
commit09695f7be98ab96204e570f95aeb9192e4c3a9f6 (patch)
tree3721bdf01e133d0453be432a4c39da2fc903a853 /src/core/settings.c
parent[hermon] Add BOFM support (diff)
downloadipxe-09695f7be98ab96204e570f95aeb9192e4c3a9f6.tar.gz
ipxe-09695f7be98ab96204e570f95aeb9192e4c3a9f6.tar.xz
ipxe-09695f7be98ab96204e570f95aeb9192e4c3a9f6.zip
[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>
Diffstat (limited to 'src/core/settings.c')
-rw-r--r--src/core/settings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/settings.c b/src/core/settings.c
index da662e616..1f22ea45f 100644
--- a/src/core/settings.c
+++ b/src/core/settings.c
@@ -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;