Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class Pcap_file {
m_packetbuffer = 0;
}
m_packetbuffer_len = len + 4096;
m_packetbuffer = new unsigned char[m_packetbuffer_len];
m_packetbuffer = new(std::nothrow) unsigned char[m_packetbuffer_len];
if (!m_packetbuffer)
m_packetbuffer_len = 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace httpd {
"Content-Type: %s\r\n"
"\r\n";

Server* g_server = 0;
static Server* g_server = 0;

class SocketPool {
public:
Expand Down Expand Up @@ -1165,7 +1165,7 @@ void start_server(int port, bool fork_me, const std::string& pcaproot, const std
if (cnt < max_conn) {
int c = server.get_connection();
if (c > -1) {
Http_socket* s = new Http_socket(c);
Http_socket* s = new(std::nothrow) Http_socket(c);
if (s && s->failed()) {
syslog(LOG_ERR | LOG_USER, "failed to create socket");
delete s;
Expand Down
4 changes: 2 additions & 2 deletions src/sql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,7 @@ Cc_func::Cc_func(const OP& op)
}
}

MMDB_s* mmdb = new MMDB_s;
MMDB_s* mmdb = new(std::nothrow) MMDB_s;
if (!mmdb) {
return;
}
Expand Down Expand Up @@ -2648,7 +2648,7 @@ Asn_func::Asn_func(const OP& op)
}
}

MMDB_s* mmdb = new MMDB_s;
MMDB_s* mmdb = new(std::nothrow) MMDB_s;
if (!mmdb) {
return;
}
Expand Down

0 comments on commit 6224234

Please sign in to comment.