summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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; \
} \
}