From: Yu Watanabe Date: Fri, 8 Mar 2019 05:42:42 +0000 (+0900) Subject: network: drop unnecessary strdup() X-Git-Tag: v242-rc1~90^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2bd0da7a054184053f6af2043233d5c513a0bc69;p=thirdparty%2Fsystemd.git network: drop unnecessary strdup() --- diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c index c8fc10d0c49..63d4d85665c 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();