From bb8e4c78e8bc1ad359906866dbe7c74d7845bc9c Mon Sep 17 00:00:00 2001 From: Ralph Wuerthner Date: Mon, 10 Oct 2016 16:26:05 +0200 Subject: [PATCH] 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() --- source3/lib/ctdbd_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2