]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-conn: add missing variable initialization
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>
Mon, 10 Oct 2016 14:26:05 +0000 (16:26 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 2 Jan 2017 10:56:50 +0000 (11:56 +0100)
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>
(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

index 04f6f2f0aacfec993936d7746dc255c3ebd12105..abdece8f9f31ac52122141cbaa8783f368885c2a 100644 (file)
@@ -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;