Browse Source

Free SSL structure on failed connection attempts.

Doug Nazar 2 năm trước cách đây
mục cha
commit
9221a7a984
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      src/nrpe.c

+ 4 - 1
src/nrpe.c

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