From: Ralph Wuerthner Date: Mon, 10 Oct 2016 14:26:05 +0000 (+0200) Subject: ctdb-conn: add missing variable initialization X-Git-Tag: samba-4.4.9~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb8e4c78e8bc1ad359906866dbe7c74d7845bc9c;p=thirdparty%2Fsamba.git ctdb-conn: add missing variable initialization Avoid potential crash in TALLOC_FREE(hdr). Signed-off-by: Ralph Wuerthner Reviewed-by: Andreas Schneider Reviewed-by: Ralph Boehme (cherry picked from commit 4194c0797f78293fe48105ce5af70f36a3c233a8) BUG: https://bugzilla.samba.org/show_bug.cgi?id=12372 ctdb: bad free in ctdbd_migrate() --- diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 04f6f2f0aac..abdece8f9f3 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -919,7 +919,7 @@ int ctdbd_db_attach(struct ctdbd_connection *conn, int ctdbd_migrate(struct ctdbd_connection *conn, uint32_t db_id, TDB_DATA key) { struct ctdb_req_call_old req; - struct ctdb_req_header *hdr; + struct ctdb_req_header *hdr = NULL; struct iovec iov[2]; ssize_t nwritten; int ret;