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;
|
bool ready;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
assert(address);
|
if (!address)
|
||||||
|
return 0;
|
||||||
|
|
||||||
ready = address_is_ready(address);
|
ready = address_is_ready(address);
|
||||||
link = address->link;
|
link = address->link;
|
||||||
|
@ -1245,7 +1246,6 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
|
||||||
|
|
||||||
case RTM_DELADDR:
|
case RTM_DELADDR:
|
||||||
log_address_debug(tmp, address ? "Forgetting" : "Kernel removed unknown", link);
|
log_address_debug(tmp, address ? "Forgetting" : "Kernel removed unknown", link);
|
||||||
if (address)
|
|
||||||
(void) address_drop(address);
|
(void) address_drop(address);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue