From 61055c25785ad00db06ece2fd804bca5bdcd4431 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 29 Mar 2013 10:07:20 -0700 Subject: [PATCH] Ensure we can never return an uninitialized EA list. Signed-off-by: Jeremy Allison Reviewed-by: David Disseldorp --- source3/smbd/trans2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 062af258330..7eb9ecfa80c 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -322,6 +322,7 @@ static NTSTATUS get_ea_list_from_file_path(TALLOC_CTX *mem_ctx, connection_struc NTSTATUS status; *pea_total_len = 0; + *ea_list = NULL; status = get_ea_names_from_file(talloc_tos(), conn, fsp, fname, &names, &num_names); @@ -515,7 +516,7 @@ static unsigned int estimate_ea_size(connection_struct *conn, files_struct *fsp, { size_t total_ea_len = 0; TALLOC_CTX *mem_ctx; - struct ea_list *ea_list; + struct ea_list *ea_list = NULL; if (!lp_ea_support(SNUM(conn))) { return 0; -- 2.11.4.GIT