summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/cpu/os.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-11-11 12:47:08 -0700
committerSimon Glass <sjg@chromium.org>2014-11-26 20:25:39 -0700
commitf80a8bbee8665defb32f26029325667704bb4776 (patch)
treea91330fe6cc6b6ecc724e581dd329cc2e336d452 /arch/sandbox/cpu/os.c
parente48f3741c357246c78aa367bbd56fe2684f7bf8d (diff)
downloadtalos-obmc-uboot-f80a8bbee8665defb32f26029325667704bb4776.tar.gz
talos-obmc-uboot-f80a8bbee8665defb32f26029325667704bb4776.zip
sandbox: Fix warnings in cpu.c and os.c
This fixes the following two problems: cppcheck reports: [arch/sandbox/cpu/start.c:132]: (error) Uninitialized variable: err [arch/sandbox/cpu/os.c:371]: (error) Memory leak: fname Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'arch/sandbox/cpu/os.c')
-rw-r--r--arch/sandbox/cpu/os.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index 31c93443db..4d5f805753 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -367,6 +367,7 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp)
done:
closedir(dir);
+ free(fname);
return ret;
}
OpenPOWER on IntegriCloud