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:
parent
78ada14f25
commit
64753f354d
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user