mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-25 06:03:40 +03:00
network: make address_drop() accept NULL
This commit is contained in:
parent
24f50382af
commit
1db01a3339
@ -405,7 +405,8 @@ static int address_drop(Address *address) {
|
||||
bool ready;
|
||||
int r;
|
||||
|
||||
assert(address);
|
||||
if (!address)
|
||||
return 0;
|
||||
|
||||
ready = address_is_ready(address);
|
||||
link = address->link;
|
||||
@ -1245,8 +1246,7 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
|
||||
|
||||
case RTM_DELADDR:
|
||||
log_address_debug(tmp, address ? "Forgetting" : "Kernel removed unknown", link);
|
||||
if (address)
|
||||
(void) address_drop(address);
|
||||
(void) address_drop(address);
|
||||
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user