aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias S. Benkmann <matthias@winterdrache.de>2008-06-07 13:14:23 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-06-07 13:14:23 (GMT)
commit6509fe0cacf25f30fb6fce9df9569d14f00f0a8f (patch)
tree0edf3d2272a974e523796e3dcec7baf064bf28f7 /src
parent82045e51c8b557f6c3d42c7bfbcc89e5096cad6f (diff)
downloadfluxbox_pavel-6509fe0cacf25f30fb6fce9df9569d14f00f0a8f.zip
fluxbox_pavel-6509fe0cacf25f30fb6fce9df9569d14f00f0a8f.tar.bz2
fix some memory leaks and uninitialized values
Diffstat (limited to 'src')
-rw-r--r--src/Ewmh.cc4
-rw-r--r--src/FbTk/FbString.hh2
-rw-r--r--src/WinClient.cc1
3 files changed, 5 insertions, 2 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index fd13a9f..3453b7e 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -156,8 +156,8 @@ void extractNetWmIcon(Atom net_wm_icon, WinClient& winclient) {
156 } 156 }
157 157
158 // allocate some memory for the icons at client side 158 // allocate some memory for the icons at client side
159 img_pm->data = new char[img_pm->bytes_per_line * height]; 159 img_pm->data = static_cast<char*>(malloc(img_pm->bytes_per_line * height));
160 img_mask->data = new char[img_mask->bytes_per_line * height]; 160 img_mask->data = static_cast<char*>(malloc(img_mask->bytes_per_line * height));
161 161
162 162
163 const unsigned long* src = icon_data.begin()->second; 163 const unsigned long* src = icon_data.begin()->second;
diff --git a/src/FbTk/FbString.hh b/src/FbTk/FbString.hh
index 21185f4..1e473cc 100644
--- a/src/FbTk/FbString.hh
+++ b/src/FbTk/FbString.hh
@@ -67,6 +67,8 @@ public:
67 bool setSource(const std::string &encoding); 67 bool setSource(const std::string &encoding);
68 void reset() { 68 void reset() {
69#ifdef HAVE_ICONV 69#ifdef HAVE_ICONV
70 if (m_iconv != ((iconv_t)-1))
71 iconv_close(m_iconv);
70 m_iconv = ((iconv_t)(-1)); 72 m_iconv = ((iconv_t)(-1));
71#endif 73#endif
72 } 74 }
diff --git a/src/WinClient.cc b/src/WinClient.cc
index 0295481..a7e689f 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -83,6 +83,7 @@ WinClient::WinClient(Window win, BScreen &screen, FluxboxWindow *fbwin):
83 send_close_message(false), 83 send_close_message(false),
84 m_win_gravity(0), 84 m_win_gravity(0),
85 m_title_override(false), 85 m_title_override(false),
86 m_icon_override(false),
86 m_window_type(Focusable::TYPE_NORMAL), 87 m_window_type(Focusable::TYPE_NORMAL),
87 m_mwm_hint(0), 88 m_mwm_hint(0),
88 m_strut(0) { 89 m_strut(0) {