network: make address_free() return NULL
This commit is contained in:
parent
2488e4d934
commit
7818f8589a
|
@ -110,9 +110,9 @@ static int address_new_static(Network *network, const char *filename, unsigned s
|
|||
return 0;
|
||||
}
|
||||
|
||||
void address_free(Address *address) {
|
||||
Address *address_free(Address *address) {
|
||||
if (!address)
|
||||
return;
|
||||
return NULL;
|
||||
|
||||
if (address->network) {
|
||||
LIST_REMOVE(addresses, address->network->static_addresses, address);
|
||||
|
@ -149,7 +149,7 @@ void address_free(Address *address) {
|
|||
|
||||
network_config_section_free(address->section);
|
||||
free(address->label);
|
||||
free(address);
|
||||
return mfree(address);
|
||||
}
|
||||
|
||||
static uint32_t address_prefix(const Address *a) {
|
||||
|
|
|
@ -57,7 +57,7 @@ struct Address {
|
|||
};
|
||||
|
||||
int address_new(Address **ret);
|
||||
void address_free(Address *address);
|
||||
Address *address_free(Address *address);
|
||||
int address_add_foreign(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret);
|
||||
int address_add(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret);
|
||||
int address_get(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret);
|
||||
|
|
Loading…
Reference in a new issue