From 3dd81756aeb6406176af51e5ad44dca6522da66c Mon Sep 17 00:00:00 2001 From: weizili Date: Sat, 18 Mar 2017 22:24:09 +0800 Subject: [PATCH] Fix a "struct evhttp_request* req" wrong usage bug. see https://github.com/Qihoo360/evpp/issues/13 --- evpp/http/service.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/evpp/http/service.cc b/evpp/http/service.cc index afaba3dbb..c25c450ec 100644 --- a/evpp/http/service.cc +++ b/evpp/http/service.cc @@ -136,10 +136,12 @@ struct Response { buffer = nullptr; } - LOG_TRACE << "free request " << req->uri; + // At this time, req is freed by evhttp framework probably. + // So don't use req any more. + // LOG_TRACE << "free request " << req->uri; } - struct evhttp_request* req; + struct evhttp_request* req; struct evbuffer* buffer; };