Fix memory leaks: delete font in main and GUIChatConsole
authorPilzAdam <pilzadam@minetest.net>
Fri, 10 May 2013 19:54:50 +0000 (21:54 +0200)
committerPilzAdam <pilzadam@minetest.net>
Fri, 10 May 2013 20:35:17 +0000 (22:35 +0200)
src/guiChatConsole.cpp
src/main.cpp

index ec23648f86cad4d155d76eda76ed672fc39c6ba7..f31e599dc7eeb6f017a4d3c567e4346eb3d4acfa 100644 (file)
@@ -121,6 +121,7 @@ GUIChatConsole::GUIChatConsole(
 
 GUIChatConsole::~GUIChatConsole()
 {
+       delete m_font;
 }
 
 void GUIChatConsole::openConsole(f32 height)
index 94382ec6085eaaa8575e7161cc9862e3f9b9b5ec..e2ea192953d0e88b650bc0d4f586375841a71881 100644 (file)
@@ -2063,6 +2063,8 @@ int main(int argc, char *argv[])
        */
        device->drop();
 
+       delete font;
+
 #endif // !SERVER
        
        // Update configuration file