Add OutOfMemory log helper
Add a special LOG_OOM() function to log all OutOfMemory errors (i.e. allocations returning NULL).
This commit is contained in:
@@ -52,6 +52,7 @@ wrap(sc_raw_socket sock) {
|
||||
|
||||
struct sc_socket_windows *socket = malloc(sizeof(*socket));
|
||||
if (!socket) {
|
||||
LOG_OOM();
|
||||
closesocket(sock);
|
||||
return SC_SOCKET_NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user