Commit 53e06455 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Tweak error handling in flush_route.

parent 3fbb01cc
......@@ -103,11 +103,11 @@ flush_route(struct route *route)
struct route *new_routes;
int n = maxroutes / 2;
new_routes = realloc(routes, n * sizeof(struct route));
if(new_routes == NULL)
return;
if(new_routes != NULL) {
routes = new_routes;
maxroutes = n;
}
}
if(lost)
route_lost(src, oldmetric);
......
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