diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c index c8fc10d0c4..63d4d85665 100644 --- a/src/libsystemd-network/network-internal.c +++ b/src/libsystemd-network/network-internal.c @@ -159,7 +159,6 @@ int config_parse_net_condition(const char *unit, Condition **ret = data; bool negate; Condition *c; - _cleanup_free_ char *s = NULL; assert(filename); assert(lvalue); @@ -170,11 +169,7 @@ int config_parse_net_condition(const char *unit, if (negate) rvalue++; - s = strdup(rvalue); - if (!s) - return log_oom(); - - c = condition_new(cond, s, false, negate); + c = condition_new(cond, rvalue, false, negate); if (!c) return log_oom();