Skip to content

Commit

Permalink
Fix potential Null pointer dereference in extract_vbucket_conf.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
icy17 committed Apr 10, 2024
1 parent 477033f commit 827c1cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/evmc/extract_vbucket_conf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void GetVbucketConf::OnHttpReqDone(struct evhttp_request* req, void* arg) {
int GetVbucketConf::GetRemoteVbucketConf(const std::string& conf_addr, std::string& context) {
evpp::httpc::URLParser url(conf_addr);
struct event_base* base = event_base_new();
if (base == NULL) {
return -1;
}
struct evhttp_connection* conn = evhttp_connection_base_new(base, nullptr, url.host.c_str(), url.port);
HttpReqDoneArg arg;
arg.event = base;
Expand Down

0 comments on commit 827c1cc

Please sign in to comment.