summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-16 22:36:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:32 -0500
commit17621ea080b7a3da71fcaa0782f8716e944dbc70 (patch)
tree2c6a6bed7bd3e26007ebfd252c597387f8de03d3 /source3
parenta90026e7a68398a7f9c38dc3cd1dad193466b8af (diff)
downloadsamba-17621ea080b7a3da71fcaa0782f8716e944dbc70.tar.gz
samba-17621ea080b7a3da71fcaa0782f8716e944dbc70.tar.bz2
samba-17621ea080b7a3da71fcaa0782f8716e944dbc70.zip
r16309: Fix Klocwork #1596. Check for NULL on talloc.
Jeremy. (This used to be commit 34b6b6723b1c87e19b0a51ef785a614d86bd5cef)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c5
1 files changed, 5 insertions, 0 deletions
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 {