Socket creation should use C++ new.

It wasn't.
This commit is contained in:
2026-01-09 23:58:47 -05:00
parent 4df86c6a22
commit c3a9c536a3
+3 -3
View File
@@ -168,11 +168,11 @@ void a_Http_set_proxy_passwd(const char *str)
* Create and init a new SocketData_t struct, insert into ValidSocks, * Create and init a new SocketData_t struct, insert into ValidSocks,
* and return a primary key for it. * 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; S->SockFD = -1;
return a_Klist_insert(&ValidSocks, S); return a_Klist_insert(&ValidSocks, S.release());
} }
/** /**