git.samba.org
/
slow
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6427dd
)
ctdb-daemon: Avoid memory leak when packet is deferred
author
Amitay Isaacs
<amitay@gmail.com>
Wed, 6 Jun 2018 13:47:13 +0000
(15:47 +0200)
committer
Amitay Isaacs
<amitay@samba.org>
Thu, 24 Oct 2019 04:06:43 +0000
(
04:06
+0000)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/server/ctdb_server.c
patch
|
blob
|
history
diff --git
a/ctdb/server/ctdb_server.c
b/ctdb/server/ctdb_server.c
index 9724d1fe0a88fc58d68a476f89515f3c92b73fcb..0d5451d62a88203366e5bc5ca3d06301e93367bd 100644
(file)
--- a/
ctdb/server/ctdb_server.c
+++ b/
ctdb/server/ctdb_server.c
@@
-375,8
+375,9
@@
static void ctdb_defer_packet(struct ctdb_context *ctdb, struct ctdb_req_header
return;
}
q->ctdb = ctdb;
- q->hdr = talloc_memdup(
ctdb
, hdr, hdr->length);
+ q->hdr = talloc_memdup(
q
, hdr, hdr->length);
if (q->hdr == NULL) {
+ talloc_free(q);
DEBUG(DEBUG_ERR,("Error copying deferred packet to self\n"));
return;
}