summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-08-07 20:43:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:26 -0500
commit8b659a2439b238d83db5bee6bcb756a7f91a124b (patch)
tree617f836b19bf6f58edb05c71a2a6de90d65b312a /source4/libnet
parent1ef10c575d47fec486923d0570b0dc0d718b92a0 (diff)
downloadsamba-8b659a2439b238d83db5bee6bcb756a7f91a124b.tar.gz
samba-8b659a2439b238d83db5bee6bcb756a7f91a124b.tar.bz2
samba-8b659a2439b238d83db5bee6bcb756a7f91a124b.zip
r17450: A bit more protection against memory allocation errors.
rafal (This used to be commit a3ef0d051ac6e4a389a294ca6001338e3da23938)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_user.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/libnet/libnet_user.h b/source4/libnet/libnet_user.h
index cd5325b58e..2bea398b65 100644
--- a/source4/libnet/libnet_user.h
+++ b/source4/libnet/libnet_user.h
@@ -82,7 +82,8 @@ struct libnet_ModifyUser {
if (new.field != 0) { \
NTTIME newval = timeval_to_nttime(new.field); \
if (newval != current->field) { \
- mod->field = talloc_memdup(mem_ctx, new.field, sizeof(*new.field)); \
+ mod->field = talloc_memdup(mem_ctx, new.field, sizeof(*new.field)); \
+ if (mod->field == NULL) return NT_STATUS_NO_MEMORY; \
mod->fields |= flag; \
} \
}