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); session->sslClient = SSL_new(session->context->ctx);
if (session->sslClient == NULL) { if (session->sslClient == NULL) {
if (session->sslServer) { if (session->sslServer) {
SSL_free(session->sslClient); SSL_free(session->sslServer);
session->sslClient = 0; session->sslServer= 0;
} }
SetError(BAD_NEW_SSL_STR, error, session, FATAL_ERROR_STATE); SetError(BAD_NEW_SSL_STR, error, session, FATAL_ERROR_STATE);
free(session); free(session);