]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb:common: Do not print NULL if we don't get a sockpath
authorAndreas Schneider <asn@samba.org>
Wed, 8 May 2019 15:03:54 +0000 (17:03 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 8 May 2019 16:33:24 +0000 (16:33 +0000)
sock_socket_start_recv() might not fill sockpath if we return early.

Found by GCC 9.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
ctdb/common/sock_daemon.c

index e5e16f8af12ffe220ef84fa3ed758d99af5ba268..6298653f4ec9dcb07855d217d5a3c0d1fb2dd44d 100644 (file)
@@ -893,7 +893,7 @@ static void sock_daemon_run_socket_fail(struct tevent_req *subreq)
                subreq, struct tevent_req);
        struct sock_daemon_run_state *state = tevent_req_data(
                req, struct sock_daemon_run_state);
-       const char *sockpath = NULL;
+       const char *sockpath = "INVALID";
        int ret = 0;
        bool status;