projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7931675
)
network: use _cleanup_ attribute at one more place
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 12 Feb 2019 04:02:38 +0000
(13:02 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Fri, 15 Feb 2019 02:45:44 +0000
(11:45 +0900)
src/network/networkd-dhcp6.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-dhcp6.c
b/src/network/networkd-dhcp6.c
index
183b3fa
..
a95cd55
100644
(file)
--- a/
src/network/networkd-dhcp6.c
+++ b/
src/network/networkd-dhcp6.c
@@
-288,7
+288,7
@@
static int dhcp6_lease_pd_prefix_acquired(sd_dhcp6_client *client, Link *link) {
}
if (pd_prefix_len < 64) {
- Route *route = NULL;
+
_cleanup_(route_freep)
Route *route = NULL;
uint32_t table;
(void) in_addr_to_string(AF_INET6, &pd_prefix, &buf);
@@
-313,12
+313,9
@@
static int dhcp6_lease_pd_prefix_acquired(sd_dhcp6_client *client, Link *link) {
log_link_warning_errno(link, r, "Cannot configure unreachable route for delegated subnet %s/%u: %m",
strnull(buf),
pd_prefix_len);
- route_free(route);
continue;
}
- route_free(route);
-
log_link_debug(link, "Configuring unreachable route for %s/%u",
strnull(buf), pd_prefix_len);