From c3a9c536a32b98a20b612ac5e25c76aa22d4019b1a9edca280a0209eb30070fb Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Fri, 9 Jan 2026 23:58:47 -0500 Subject: [PATCH] Socket creation should use C++ new. It wasn't. --- src/IO/http.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()); } /**