fix some memory leaks and uninitialized values
Matthias S. Benkmann matthias@winterdrache.de
3 files changed,
5 insertions(+),
2 deletions(-)
M
src/Ewmh.cc
→
src/Ewmh.cc
@@ -156,8 +156,8 @@ return;
} // allocate some memory for the icons at client side - img_pm->data = new char[img_pm->bytes_per_line * height]; - img_mask->data = new char[img_mask->bytes_per_line * height]; + img_pm->data = static_cast<char*>(malloc(img_pm->bytes_per_line * height)); + img_mask->data = static_cast<char*>(malloc(img_mask->bytes_per_line * height)); const unsigned long* src = icon_data.begin()->second;
M
src/FbTk/FbString.hh
→
src/FbTk/FbString.hh
@@ -67,6 +67,8 @@
bool setSource(const std::string &encoding); void reset() { #ifdef HAVE_ICONV + if (m_iconv != ((iconv_t)-1)) + iconv_close(m_iconv); m_iconv = ((iconv_t)(-1)); #endif }
M
src/WinClient.cc
→
src/WinClient.cc
@@ -83,6 +83,7 @@ send_focus_message(false),
send_close_message(false), m_win_gravity(0), m_title_override(false), + m_icon_override(false), m_window_type(Focusable::TYPE_NORMAL), m_mwm_hint(0), m_strut(0) {