diff options
author | Amitay Isaacs <amitay@gmail.com> | 2015-06-02 11:15:11 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2015-06-12 12:40:54 +0200 |
commit | 2b352ff20597b9e34b3777d35deca1bf56209f8a (patch) | |
tree | cdadeedb258bf2e6956ec01dbb257ff2a80acb49 /ctdb | |
parent | 5ae6a8f2fff5b5f4d46f496fd83f555be4b3d448 (diff) | |
download | samba-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.c | 1 |
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); |