From 67ea9b0390bc507cbf79571ab7e2c474badd0f17 Mon Sep 17 00:00:00 2001 From: Garux Date: Tue, 26 Oct 2021 18:30:05 +0300 Subject: [PATCH] fix excess memory allocation --- tools/quake3/q3map2/vis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/quake3/q3map2/vis.cpp b/tools/quake3/q3map2/vis.cpp index cb6d1666..4642cd1a 100644 --- a/tools/quake3/q3map2/vis.cpp +++ b/tools/quake3/q3map2/vis.cpp @@ -813,7 +813,7 @@ void LoadPortals( char *name ){ } } - faces = safe_calloc( 2 * numfaces * sizeof( vportal_t ) ); + faces = safe_calloc( numfaces * sizeof( vportal_t ) ); faceleafs = safe_calloc( portalclusters * sizeof( leaf_t ) ); for ( int i = 0; i < numfaces; ++i )