diff --git a/src/IO/http.cc b/src/IO/http.cc index a3158a6..a690492 100644 --- a/src/IO/http.cc +++ b/src/IO/http.cc @@ -168,11 +168,11 @@ void a_Http_set_proxy_passwd(const char *str) * Create and init a new SocketData_t struct, insert into ValidSocks, * and return a primary key for it. */ -static int Http_sock_new(void) +static int Http_sock_new() { - SocketData_t *S = dNew0(SocketData_t, 1); + auto S = std::make_unique< SocketData_t >(); S->SockFD = -1; - return a_Klist_insert(&ValidSocks, S); + return a_Klist_insert(&ValidSocks, S.release()); } /**