make sure we only call rt->on_free if req has route

This commit is contained in:
Joris Vink 2021-12-15 12:16:37 +01:00
parent e8e01980fc
commit e545657023
1 changed files with 1 additions and 1 deletions

View File

@ -442,7 +442,7 @@ http_request_free(struct http_request *req)
struct http_header *hdr, *next;
struct http_cookie *ck, *cknext;
if (req->rt->on_free != NULL)
if (req->rt != NULL && req->rt->on_free != NULL)
kore_runtime_http_request_free(req->rt->on_free, req);
if (req->runlock != NULL) {