summaryrefslogtreecommitdiff
path: root/source/lib/util_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/util_sock.c')
-rw-r--r--source/lib/util_sock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index e040f4631a0..a7c35c48878 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -1904,8 +1904,7 @@ int create_pipe_sock(const char *socket_dir,
goto out_close;
}
- asprintf(&path, "%s/%s", socket_dir, socket_name);
- if (!path) {
+ if (asprintf(&path, "%s/%s", socket_dir, socket_name) == -1) {
goto out_close;
}