network: make address_label_free() return NULL
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user