diff options
-rw-r--r-- | src/listen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/listen.c b/src/listen.c index 25801a24c..616466330 100644 --- a/src/listen.c +++ b/src/listen.c @@ -337,8 +337,11 @@ listen_add_path(const char *path, GError **error) bool success; path_length = strlen(path); - if (path_length >= sizeof(s_un.sun_path)) - g_error("unix socket path is too long"); + if (path_length >= sizeof(s_un.sun_path)) { + g_set_error(error, listen_quark(), 0, + "unix socket path is too long"); + return false; + } unlink(path); |