]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: use TAKE_PTR() at one more place
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Sep 2018 08:26:04 +0000 (17:26 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Sep 2018 08:48:34 +0000 (17:48 +0900)
src/network/networkd-routing-policy-rule.c

index afa14491913db36256aa58b0633e4f456dce194c..ce9e1416a9c55ceac6740c6c6c26eb703244c19a 100644 (file)
@@ -394,9 +394,8 @@ static int routing_policy_rule_new_static(Network *network, const char *filename
         if (r < 0)
                 return r;
 
-        rule->section = n;
+        rule->section = TAKE_PTR(n);
         rule->network = network;
-        n = NULL;
 
         r = hashmap_put(network->rules_by_section, rule->section, rule);
         if (r < 0)