diff options
author | Jeremy Allison <jra@samba.org> | 2007-04-30 01:34:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:48 -0500 |
commit | 79de0ad9463a5cd64978beae37df79fbb4f74632 (patch) | |
tree | feb1638b81ac49909465456163e70cf4e57dc3a9 /source3/utils | |
parent | 1e362c0e7fff603cffa32863a5b07ecbc50f8a2d (diff) | |
download | samba-79de0ad9463a5cd64978beae37df79fbb4f74632.tar.gz samba-79de0ad9463a5cd64978beae37df79fbb4f74632.tar.bz2 samba-79de0ad9463a5cd64978beae37df79fbb4f74632.zip |
r22588: Make all uses of TALLOC_MEMDUP consistent.
Jeremy.
(This used to be commit 8ad13718af0ba1fcb10a6f1631b1ed3cb8d11175)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_printer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index d0b55454f9..63ea50a67b 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -2331,7 +2331,11 @@ NTSTATUS rpc_printer_migrate_settings_internals(const DOM_SID *domain_sid, value.type = REG_SZ; value.size = data.uni_str_len * 2; - value.data_p = (uint8 *)TALLOC_MEMDUP(mem_ctx, data.buffer, value.size); + if (value.size) { + value.data_p = (uint8 *)TALLOC_MEMDUP(mem_ctx, data.buffer, value.size); + } else { + value.data_p = NULL; + } if (opt_verbose) display_reg_value(subkey, value); |