From aad53cf59524355df757c9de7dca081da75b76d0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 4 Apr 2016 16:23:09 +0200 Subject: [PATCH] ctdbd: Use talloc_memdup where appropriate .... 40 bytes .text less ;-) Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- ctdb/server/ctdb_daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index a5fefe33f0a..321b86e49bc 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -1709,9 +1709,9 @@ int32_t ctdb_control_register_notify(struct ctdb_context *ctdb, uint32_t client_ nl->ctdb = ctdb; nl->srvid = notify->srvid; nl->data.dsize = notify->len; - nl->data.dptr = talloc_size(nl, nl->data.dsize); + nl->data.dptr = talloc_memdup(nl, notify->notify_data, + nl->data.dsize); CTDB_NO_MEMORY(ctdb, nl->data.dptr); - memcpy(nl->data.dptr, notify->notify_data, nl->data.dsize); DLIST_ADD(client->notify, nl); talloc_set_destructor(nl, ctdb_client_notify_destructor); -- 2.47.3