MDLMoader: fix resource leak.
authorKim Kulling <kim.kulling@googlemail.com>
Tue, 30 Aug 2016 17:50:53 +0000 (19:50 +0200)
committerKim Kulling <kim.kulling@googlemail.com>
Tue, 30 Aug 2016 17:50:53 +0000 (19:50 +0200)
code/MDLMaterialLoader.cpp

index 4c36c33..a84afad 100644 (file)
@@ -731,6 +731,9 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
     }
     VALIDATE_FILE_SIZE(szCurrent);
     *szCurrentOut = szCurrent;
+    if ( nullptr != pcNew ) {
+        delete pcNew;
+    }
 }
 
 // ------------------------------------------------------------------------------------------------