diff --git a/src/libei-socket.c b/src/libei-socket.c index 2cf2db6..4fb5c86 100644 --- a/src/libei-socket.c +++ b/src/libei-socket.c @@ -83,8 +83,8 @@ ei_setup_backend_socket(struct ei *ei, const char *socketpath) if (!socketpath) socketpath = getenv("LIBEI_SOCKET"); - assert(socketpath); - assert(socketpath[0] != '\0'); + if (!socketpath || socketpath[0] == '\0') + return -ENOENT; _cleanup_free_ char *path = NULL; if (socketpath[0] == '/') {