network: make address_label_free() return NULL
This commit is contained in:
parent
d6a2a0f9a7
commit
cae418a306
|
@ -11,9 +11,9 @@
|
|||
#include "parse-util.h"
|
||||
#include "socket-util.h"
|
||||
|
||||
void address_label_free(AddressLabel *label) {
|
||||
AddressLabel *address_label_free(AddressLabel *label) {
|
||||
if (!label)
|
||||
return;
|
||||
return NULL;
|
||||
|
||||
if (label->network) {
|
||||
assert(label->section);
|
||||
|
@ -21,7 +21,7 @@ void address_label_free(AddressLabel *label) {
|
|||
}
|
||||
|
||||
network_config_section_free(label->section);
|
||||
free(label);
|
||||
return mfree(label);
|
||||
}
|
||||
|
||||
static int address_label_new_static(Network *network, const char *filename, unsigned section_line, AddressLabel **ret) {
|
||||
|
|
|
@ -27,7 +27,7 @@ struct AddressLabel {
|
|||
union in_addr_union in_addr;
|
||||
};
|
||||
|
||||
void address_label_free(AddressLabel *label);
|
||||
AddressLabel *address_label_free(AddressLabel *label);
|
||||
|
||||
DEFINE_NETWORK_SECTION_FUNCTIONS(AddressLabel, address_label_free);
|
||||
|
||||
|
|
Loading…
Reference in a new issue