network: fix use-after-free

If the lifetime of the route is already expired, do not try to
configure it.

Fixes a use-after-free, as the Request object is already freed, thus, we
cannot use Route or Link stored in Request object.
This commit is contained in:
Yu Watanabe
2022-10-03 09:15:10 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent 2ff7862bf2
commit 0a8720c7f0
+2
View File
@@ -1382,6 +1382,8 @@ static int route_process_request(Request *req, Link *link, Route *route) {
}
else
route_cancel_requesting(route);
return 1;
}
r = route_configure(route, sec, link, req);