fix memory leak in huge page detection