[PATCH] ctdb: Remove talloc_steal from ctdb_call_local
Swen Schillig
swen at vnet.ibm.com
Fri Mar 9 08:06:09 UTC 2018
Please review and push if OK.
Thanks in advance.
Cheers Swen
-------------- next part --------------
From 62e7e31086e84d6d340ec699a8bf0750c356f848 Mon Sep 17 00:00:00 2001
From: Swen Schillig <swen at vnet.ibm.com>
Date: Thu, 8 Feb 2018 09:25:16 +0100
Subject: [PATCH] ctdb: Remove talloc_steal from ctdb_call_local
Removed talloc_steal from ctdb_call_local as it is not requried anymore.
Both memory references are only used as a source for a
succeeding talloc_memdup and are not referenced after that.
From the caller side, this memory is handled accordingly after the call.
Signed-off-by: Swen Schillig <swen at vnet.ibm.com>
---
ctdb/client/ctdb_client.c | 2 --
ctdb/server/ctdb_call.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 955bd89d940..975e8853b71 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -392,8 +392,6 @@ static struct ctdb_client_call_state *ctdb_client_call_local_send(struct ctdb_db
state->call = talloc_memdup(state, call, sizeof(struct ctdb_call));
CTDB_NO_MEMORY_NULL(ctdb, state->call);
- talloc_steal(state, data->dptr);
-
state->state = CTDB_CALL_DONE;
state->ctdb_db = ctdb_db;
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index 7657267528e..dfc8c6b1204 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -1431,8 +1431,6 @@ struct ctdb_call_state *ctdb_call_local_send(struct ctdb_db_context *ctdb_db,
state = talloc_zero(ctdb_db, struct ctdb_call_state);
CTDB_NO_MEMORY_NULL(ctdb, state);
- talloc_steal(state, data->dptr);
-
state->state = CTDB_CALL_DONE;
state->call = talloc_memdup(state, call, sizeof(struct ctdb_call));
CTDB_NO_MEMORY_NULL(ctdb, state->call);
--
2.14.3
More information about the samba-technical
mailing list