git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
611c9a0
)
ctdb: Fixing possible memory leak in ctdb_tcp_read_cb
author
Swen Schillig
<swen@vnet.ibm.com>
Tue, 13 Mar 2018 08:34:52 +0000
(09:34 +0100)
committer
Jeremy Allison
<jra@samba.org>
Fri, 30 Mar 2018 22:07:18 +0000
(
00:07
+0200)
In case of an error condition the further processing of the data is cancelled
and the callback returns. In such a scenario the data has to be free'd.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
ctdb/tcp/tcp_io.c
patch
|
blob
|
history
diff --git
a/ctdb/tcp/tcp_io.c
b/ctdb/tcp/tcp_io.c
index 5bb4b5bd1a7bdd54425f599a824f62345d8bc3a6..3c3b1c167f320f7c4517aa7b0a70de4cb1ada153 100644
(file)
--- a/
ctdb/tcp/tcp_io.c
+++ b/
ctdb/tcp/tcp_io.c
@@
-80,7
+80,8
@@
void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args)
return;
failed:
- talloc_free(in);
+ TALLOC_FREE(in);
+ TALLOC_FREE(data);
}
/*