network: make neighbor_free() return NULL

This commit is contained in:
Yu Watanabe
2020-10-07 02:44:42 +09:00
parent 78ada14f25
commit 64753f354d
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -9,9 +9,9 @@
#include "networkd-network.h"
#include "set.h"
void neighbor_free(Neighbor *neighbor) {
Neighbor *neighbor_free(Neighbor *neighbor) {
if (!neighbor)
return;
return NULL;
if (neighbor->network) {
assert(neighbor->section);
@@ -25,7 +25,7 @@ void neighbor_free(Neighbor *neighbor) {
set_remove(neighbor->link->neighbors_foreign, neighbor);
}
free(neighbor);
return mfree(neighbor);
}
DEFINE_NETWORK_SECTION_FUNCTIONS(Neighbor, neighbor_free);
+1 -1
View File
@@ -30,7 +30,7 @@ typedef struct Neighbor {
size_t lladdr_size;
} Neighbor;
void neighbor_free(Neighbor *neighbor);
Neighbor *neighbor_free(Neighbor *neighbor);
void network_verify_neighbors(Network *network);