The branch, master has been updated via f5f89b1b990 ctdb: Use TALLOC_FREE() in a few places from 8846887a55b s3:printing: Fix %J substition
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit f5f89b1b990a3de0e9366beef81cf1a2ce8374da Author: Volker Lendecke <v...@samba.org> Date: Thu Nov 7 12:12:45 2019 +0100 ctdb: Use TALLOC_FREE() in a few places We have a macro for NULLing out the pointer Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Amitay Isaacs <ami...@gmail.com> Autobuild-User(master): Amitay Isaacs <ami...@samba.org> Autobuild-Date(master): Fri Nov 8 01:35:11 UTC 2019 on sn-devel-184 ----------------------------------------------------------------------- Summary of changes: ctdb/common/ctdb_io.c | 9 +++------ ctdb/tcp/tcp_connect.c | 6 ++---- 2 files changed, 5 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/common/ctdb_io.c b/ctdb/common/ctdb_io.c index 000f71e4c20..bf8bc73b77d 100644 --- a/ctdb/common/ctdb_io.c +++ b/ctdb/common/ctdb_io.c @@ -290,8 +290,7 @@ static void queue_io_write(struct ctdb_queue *queue) queue->out_queue_length--; talloc_free(pkt); } - talloc_free(queue->fde); - queue->fde = NULL; + TALLOC_FREE(queue->fde); queue->fd = -1; tevent_schedule_immediate(queue->im, queue->ctdb->ev, queue_dead, queue); @@ -363,8 +362,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length) !(queue->ctdb->flags & CTDB_FLAG_TORTURE)) { ssize_t n = write(queue->fd, data, length2); if (n == -1 && errno != EAGAIN && errno != EWOULDBLOCK) { - talloc_free(queue->fde); - queue->fde = NULL; + TALLOC_FREE(queue->fde); queue->fd = -1; tevent_schedule_immediate(queue->im, queue->ctdb->ev, queue_dead, queue); @@ -430,8 +428,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length) int ctdb_queue_set_fd(struct ctdb_queue *queue, int fd) { queue->fd = fd; - talloc_free(queue->fde); - queue->fde = NULL; + TALLOC_FREE(queue->fde); if (fd != -1) { queue->fde = tevent_add_fd(queue->ctdb->ev, queue, fd, diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c index a75f35a809e..b0572881880 100644 --- a/ctdb/tcp/tcp_connect.c +++ b/ctdb/tcp/tcp_connect.c @@ -93,8 +93,7 @@ static void ctdb_node_connect_write(struct tevent_context *ev, int one = 1; int ret; - talloc_free(tnode->connect_te); - tnode->connect_te = NULL; + TALLOC_FREE(tnode->connect_te); ret = getsockopt(tnode->out_fd, SOL_SOCKET, SO_ERROR, &error, &len); if (ret != 0 || error != 0) { @@ -105,8 +104,7 @@ static void ctdb_node_connect_write(struct tevent_context *ev, return; } - talloc_free(tnode->connect_fde); - tnode->connect_fde = NULL; + TALLOC_FREE(tnode->connect_fde); ret = setsockopt(tnode->out_fd, IPPROTO_TCP, -- Samba Shared Repository