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