]> sourceware.org Git - lvm2.git/commitdiff
cov: check for socket_path being set
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 25 Jun 2019 13:11:05 +0000 (15:11 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 9 Aug 2019 10:57:07 +0000 (12:57 +0200)
As we check for existince on entering path
let's ensure it's there also on exit path.

libdaemon/server/daemon-server.c

index 9dd0017515883e972b77295ef4d5fd2411a5876d..2df4e894cee07994cc5e2beebb2d3b4355198b2b 100644 (file)
@@ -690,7 +690,7 @@ void daemon_start(daemon_state s)
 out:
        /* If activated by systemd, do not unlink the socket - systemd takes care of that! */
        if (!_systemd_activation && s.socket_fd >= 0)
-               if (unlink(s.socket_path))
+               if (s.socket_path && unlink(s.socket_path))
                        perror("unlink error");
 
        if (s.socket_fd >= 0)
This page took 0.041206 seconds and 5 git commands to generate.