From 911cb5cb9b1d6bd98d1e60360a4faf273af0f535 Mon Sep 17 00:00:00 2001 From: def Date: Mon, 12 Oct 2020 15:25:46 +0200 Subject: [PATCH] CAutoMapper: Delete pUpdateLayer /media/ddnet/src/game/editor/auto_map.cpp:433:1: warning: Potential leak of memory pointed to by 'pUpdateLayer' [clang-analyzer-cplusplus.NewDeleteLeaks] } ^ --- src/game/editor/auto_map.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/editor/auto_map.cpp b/src/game/editor/auto_map.cpp index 8666c18cb..7b1c9f1e0 100644 --- a/src/game/editor/auto_map.cpp +++ b/src/game/editor/auto_map.cpp @@ -430,6 +430,9 @@ void CAutoMapper::ProceedLocalized(CLayerTiles *pLayer, int ConfigID, int Seed, out->m_Flags = in->m_Flags; } } + + if(pUpdateLayer) + delete pUpdateLayer; } void CAutoMapper::Proceed(CLayerTiles *pLayer, int ConfigID, int Seed, int SeedOffsetX, int SeedOffsetY)