Commit 7091888e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Avoid reading freed memory.

parent 3c961c72
......@@ -134,12 +134,14 @@ expire_requests()
if(request->time < now.tv_sec - 60) {
if(previous == NULL) {
recorded_requests = request->next;
free(request);
request = recorded_requests;
} else {
previous->next = request->next;
free(request);
request = previous->next;
}
free(request);
recompute = 1;
} else {
request = request->next;
}
......
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