Commit 04116bee authored by Antonin Décimo's avatar Antonin Décimo Committed by Juliusz Chroboczek

Free neighbour buffer if neighbour alloc failed.

parent 09e6236a
...@@ -94,6 +94,7 @@ find_neighbour(const unsigned char *address, struct interface *ifp) ...@@ -94,6 +94,7 @@ find_neighbour(const unsigned char *address, struct interface *ifp)
neigh = calloc(1, sizeof(struct neighbour)); neigh = calloc(1, sizeof(struct neighbour));
if(neigh == NULL) { if(neigh == NULL) {
free(buf);
perror("malloc(neighbour)"); perror("malloc(neighbour)");
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment