ctdb-conn: add missing variable initialization
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>
Mon, 10 Oct 2016 14:26:05 +0000 (16:26 +0200)
committerRalph Boehme <slow@samba.org>
Mon, 10 Oct 2016 20:35:37 +0000 (22:35 +0200)
Avoid potential crash in TALLOC_FREE(hdr).

Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/ctdbd_conn.c

index 1f8ac947199e8858c1f47a69932b4a71eb80ae06..118f3a026382e4d06fa4ff902531bdcd11898e04 100644 (file)
@@ -765,7 +765,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;