A cstatus != 0 does not guarantee to have no received data
referenced by outdata.dptr.
Therefore, make sure outdata.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>
static bool ctdbd_working(struct ctdbd_connection *conn, uint32_t vnn)
{
int32_t cstatus=-1;
- TDB_DATA outdata;
+ TDB_DATA outdata = {0};
struct ctdb_node_map_old *m;
bool ok = false;
uint32_t i;
}
if ((cstatus != 0) || (outdata.dptr == NULL)) {
DEBUG(2, ("Received invalid ctdb data\n"));
- return false;
+ goto fail;
}
m = (struct ctdb_node_map_old *)outdata.dptr;