mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
ctdbd_conn: possible memleak in ctdbd_dbpath
A cstatus != 0 does not guarantee to have no received data referenced by rdata.dptr. Therefore, make sure rdata.dptr is free'd. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
6e146c855a
commit
95fc8bd44a
@ -834,7 +834,7 @@ char *ctdbd_dbpath(struct ctdbd_connection *conn,
|
||||
if ((ret != 0) || cstatus != 0) {
|
||||
DEBUG(0, (__location__ " ctdb_control for getdbpath failed: %s\n",
|
||||
strerror(ret)));
|
||||
return NULL;
|
||||
TALLOC_FREE(rdata.dptr);
|
||||
}
|
||||
|
||||
return (char *)rdata.dptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user