diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index 546328b24d..5d64397062 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -226,14 +226,14 @@ daemonUnixSocketPaths(struct daemonConfig *config, if (config->unix_sock_dir) { if (virAsprintf(sockfile, "%s/%s-sock", - SOCK_PREFIX, config->unix_sock_dir) < 0) + config->unix_sock_dir, SOCK_PREFIX) < 0) goto cleanup; if (privileged) { if (virAsprintf(rosockfile, "%s/%s-sock-ro", - SOCK_PREFIX, config->unix_sock_dir) < 0 || + config->unix_sock_dir, SOCK_PREFIX) < 0 || virAsprintf(admsockfile, "%s/%s-admin-sock", - SOCK_PREFIX, config->unix_sock_dir) < 0) + config->unix_sock_dir, SOCK_PREFIX) < 0) goto cleanup; } } else {