Explorar el Código

Free SSL structure on failed connection attempts.

Doug Nazar hace 2 años
padre
commit
9221a7a984
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      src/nrpe.c

+ 4 - 1
src/nrpe.c

@@ -1771,8 +1771,11 @@ void handle_connection(int sock)
     		return;
         }
 
-		if (handle_conn_ssl(sock, ssl) != OK)
+		if (handle_conn_ssl(sock, ssl) != OK) {
+			complete_SSL_shutdown(ssl);
+			SSL_free(ssl);
 			return;
+		}
 	}
 #endif