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

Tweak error handling in flush_route.

parent 3fbb01cc
......@@ -103,10 +103,10 @@ 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;
routes = new_routes;
maxroutes = n;
if(new_routes != NULL) {
routes = new_routes;
maxroutes = n;
}
}
if(lost)
......
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