1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-03 04:23:50 +03:00

r17450: A bit more protection against memory allocation errors.

rafal
This commit is contained in:
Rafal Szczesniak
2006-08-07 20:43:06 +00:00
committed by Gerald (Jerry) Carter
parent e68e296cbe
commit a3ef0d051a

View File

@@ -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; \
} \
}