sd-varlink: add missing error check in sd_varlink_listen_auto()

Follow-up for 50994b2f91
This commit is contained in:
Mike Yuan
2024-12-25 15:23:19 +01:00
parent 5ce8d7d839
commit 3217fd5915

View File

@@ -3710,6 +3710,8 @@ _public_ int sd_varlink_server_listen_auto(sd_varlink_server *s) {
assert_return(s, -EINVAL);
n = sd_varlink_server_listen_name(s, "varlink");
if (n < 0)
return n;
/* Let's listen on an explicitly specified address */
const char *e = secure_getenv("SYSTEMD_VARLINK_LISTEN");