summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-09-13 20:06:45 +0200
committerVolker Lendecke <vl@samba.org>2014-09-18 20:36:11 +0200
commitb365d44e15192efd7597f7b7e69bd302dc244c88 (patch)
tree4f686fbadd3f6b540891ec71156e9d8e86f0c57a /source3/lib
parent81d79e6e56f117f05e3ed24e2bcb5bb45376887b (diff)
downloadsamba-b365d44e15192efd7597f7b7e69bd302dc244c88.tar.gz
samba-b365d44e15192efd7597f7b7e69bd302dc244c88.tar.xz
samba-b365d44e15192efd7597f7b7e69bd302dc244c88.zip
ctdb_conn: Fix a small memory leak when releasing an IP
We're exiting anyway, but when in the future we have multichannel this might actually be a small leak. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/ctdbd_conn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 3ba8385ada..a667482f6b 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -415,6 +415,8 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid,
DEBUG(10, ("received CTDB_SRVID_RELEASE_IP\n"));
ret = conn->release_ip_handler((const char *)msg->data,
conn->release_ip_priv);
+ TALLOC_FREE(hdr);
+
if (ret) {
/*
* We need to release the ip,
@@ -426,7 +428,6 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid,
conn->release_ip_priv = NULL;
return NT_STATUS_ADDRESS_CLOSED;
}
- TALLOC_FREE(hdr);
goto next_pkt;
}