libdaemon/server/daemon-server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
index 9dd0017..2df4e89 100644
--- a/libdaemon/server/daemon-server.c
+++ b/libdaemon/server/daemon-server.c
@@ -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)