From 9c8b58a6166b681c587f59358b04efcd569b11db Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 30 Jun 2015 08:09:44 +0000 Subject: MirLua: fixed some memory leaks git-svn-id: http://svn.miranda-ng.org/main/trunk@14449 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_popup.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/MirLua/src/m_popup.cpp') diff --git a/plugins/MirLua/src/m_popup.cpp b/plugins/MirLua/src/m_popup.cpp index f76a90b91a..c064d34ef3 100644 --- a/plugins/MirLua/src/m_popup.cpp +++ b/plugins/MirLua/src/m_popup.cpp @@ -15,12 +15,12 @@ static POPUPDATA2* MakePopupData(lua_State *L) lua_pushstring(L, "Title"); lua_gettable(L, -2); - ppd->lptzTitle = mir_utf8decodeT((char*)lua_tostring(L, -1)); + ppd->lptzTitle = mir_utf8decodeT(lua_tostring(L, -1)); lua_pop(L, 1); lua_pushstring(L, "Text"); lua_gettable(L, -2); - ppd->lptzText = mir_utf8decodeT((char*)luaL_checkstring(L, -1)); + ppd->lptzText = mir_utf8decodeT(luaL_checkstring(L, -1)); lua_pop(L, 1); lua_pushstring(L, "hContact"); @@ -59,6 +59,9 @@ static int lua_AddPoput(lua_State *L) INT_PTR res = ::CallService(MS_POPUP_ADDPOPUP2, (WPARAM)ppd, 0); lua_pushinteger(L, res); + mir_free(ppd->lptzTitle); + mir_free(ppd->lptzText); + return 1; } -- cgit v1.2.3