summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2015-06-02 11:15:11 +1000
committerAmitay Isaacs <amitay@samba.org>2015-06-12 12:40:54 +0200
commit2b352ff20597b9e34b3777d35deca1bf56209f8a (patch)
treecdadeedb258bf2e6956ec01dbb257ff2a80acb49 /ctdb
parent5ae6a8f2fff5b5f4d46f496fd83f555be4b3d448 (diff)
downloadsamba-2b352ff20597b9e34b3777d35deca1bf56209f8a.tar.gz
ctdb-locking: Avoid memory leak in the failure case
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11293 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_lock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index 3e5208e6867..2377ac0ef80 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -906,6 +906,7 @@ static struct lock_request *ctdb_lock_internal(TALLOC_CTX *mem_ctx,
if (lock_ctx->key.dptr == NULL) {
DEBUG(DEBUG_ERR, (__location__ "Memory allocation error\n"));
talloc_free(lock_ctx);
+ talloc_free(request);
return NULL;
}
lock_ctx->key_hash = ctdb_hash(&key);