1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

network: make neighbor_free() return NULL

This commit is contained in:
Yu Watanabe 2020-09-30 00:45:19 +09:00
parent 78ada14f25
commit 64753f354d
2 changed files with 4 additions and 4 deletions

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);

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);