ctdb-takeover: Fix CID 1398169 Unchecked return value
authorMartin Schwenke <martin@meltin.net>
Tue, 27 Dec 2016 19:14:56 +0000 (06:14 +1100)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 28 Dec 2016 00:29:21 +0000 (01:29 +0100)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: David Disseldorp <ddiss@samba.org>
ctdb/server/ctdb_takeover_helper.c

index 3057528c8bbba29d099817b2e30d65ebff1be7e1..b2062f095ff2805f8c159c95f845337bacf08081 100644 (file)
@@ -1164,7 +1164,12 @@ int main(int argc, const char *argv[])
                }
        }
 
-       logging_init(mem_ctx, NULL, NULL, "ctdb-takeover");
+       ret = logging_init(mem_ctx, NULL, NULL, "ctdb-takeover");
+       if (ret != 0) {
+               fprintf(stderr,
+                       "ctdb-takeover: Unable to initialize logging\n");
+               goto done;
+       }
 
        ev = tevent_context_init(mem_ctx);
        if (ev == NULL) {