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) ...@@ -103,10 +103,10 @@ 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)
......
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