From 17621ea080b7a3da71fcaa0782f8716e944dbc70 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 16 Jun 2006 22:36:12 +0000 Subject: r16309: Fix Klocwork #1596. Check for NULL on talloc. Jeremy. (This used to be commit 34b6b6723b1c87e19b0a51ef785a614d86bd5cef) --- source3/smbd/trans2.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index ef6cae14ba..27fd62be7f 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -172,6 +172,11 @@ static struct ea_list *get_ea_list_from_file(TALLOC_CTX *mem_ctx, connection_str for (i = 0, ea_namelist = TALLOC(mem_ctx, ea_namelist_size); i < 6; ea_namelist = TALLOC_REALLOC_ARRAY(mem_ctx, ea_namelist, char, ea_namelist_size), i++) { + + if (!ea_namelist) { + return NULL; + } + if (fsp && fsp->fh->fd != -1) { sizeret = SMB_VFS_FLISTXATTR(fsp, fsp->fh->fd, ea_namelist, ea_namelist_size); } else { -- cgit