mirror of
https://github.com/samba-team/samba.git
synced 2025-02-24 13:57:43 +03:00
lib: Use talloc_memdup in messaging_rec_dup
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Dec 28 04:20:48 CET 2014 on sn-devel-104
This commit is contained in:
parent
8aa67651db
commit
40a0a90d7f
@ -570,8 +570,7 @@ static struct messaging_rec *messaging_rec_dup(TALLOC_CTX *mem_ctx,
|
||||
|
||||
result->fds = NULL;
|
||||
if (result->num_fds > 0) {
|
||||
result->fds = talloc_array(result, int64_t, result->num_fds);
|
||||
memcpy(result->fds, rec->fds, fds_size);
|
||||
result->fds = talloc_memdup(result, rec->fds, fds_size);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user