From f80a8bbee8665defb32f26029325667704bb4776 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 11 Nov 2014 12:47:08 -0700 Subject: 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 Reported-by: Wolfgang Denk --- arch/sandbox/cpu/os.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/sandbox/cpu/os.c') 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; } -- cgit v1.2.1