fix sniffer out of memory potential problem

This commit is contained in:
toddouska
2012-09-28 10:58:33 -07:00
parent bd849ea9d7
commit 30bec6c193

View File

@@ -1666,8 +1666,8 @@ static SnifferSession* CreateSession(IpInfo* ipInfo, TcpInfo* tcpInfo,
session->sslClient = SSL_new(session->context->ctx);
if (session->sslClient == NULL) {
if (session->sslServer) {
SSL_free(session->sslClient);
session->sslClient = 0;
SSL_free(session->sslServer);
session->sslServer= 0;
}
SetError(BAD_NEW_SSL_STR, error, session, FATAL_ERROR_STATE);
free(session);