sd-varlink: simplify allocation

Suggested in post-merge review.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-04-04 22:01:31 +02:00
parent 047ae265cc
commit 865f16d7a0
+2 -5
View File
@@ -3100,11 +3100,8 @@ _public_ int sd_varlink_set_sentinel(sd_varlink *v, const char *error_id) {
-EUCLEAN);
char *s = NULL;
if (error_id) {
s = strdup(error_id);
if (!s)
return log_oom_debug();
}
if (strdup_to(&s, error_id) < 0)
return log_oom_debug();
if (v->sentinel != POINTER_MAX)
free(v->sentinel);