Skip to content

Commit

Permalink
Fix potential Null pointer dereference in evhttp_client_test.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
icy17 committed Apr 10, 2024
1 parent 477033f commit f050cb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/evhttp_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ void http_request_done(struct evhttp_request* req, void* arg) {

TEST_UNIT(evhttpClientSample) {
struct event_base* base = event_base_new();
if (base == NULL) {
return;
}
#if defined(EVPP_HTTP_CLIENT_SUPPORTS_SSL)
struct evhttp_connection* conn = evhttp_connection_base_new(base, nullptr, "www.360.cn", 443);
#else
Expand Down

0 comments on commit f050cb2

Please sign in to comment.