aboutsummaryrefslogtreecommitdiff
path: root/src/Xutil.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-10-02 16:14:41 (GMT)
committerrathnor <rathnor>2003-10-02 16:14:41 (GMT)
commit158b515e21f0f0154041cd5985ec38fe37c0e875 (patch)
treec1aebd425cef8610820043ae1f380dd5fb1f02d1 /src/Xutil.cc
parentbb1a7c92d8bb194e7e415f4348b7428f1b8ef436 (diff)
downloadfluxbox-158b515e21f0f0154041cd5985ec38fe37c0e875.zip
fluxbox-158b515e21f0f0154041cd5985ec38fe37c0e875.tar.bz2
address some memory issues shown up with valgrind
Diffstat (limited to 'src/Xutil.cc')
-rw-r--r--src/Xutil.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Xutil.cc b/src/Xutil.cc
index 5203469..671c52e 100644
--- a/src/Xutil.cc
+++ b/src/Xutil.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: Xutil.cc,v 1.1 2003/06/22 12:23:57 fluxgen Exp $ 23// $Id: Xutil.cc,v 1.2 2003/10/02 16:14:41 rathnor Exp $
24 24
25#include "Xutil.hh" 25#include "Xutil.hh"
26 26
@@ -41,6 +41,7 @@ std::string getWMName(Window window) {
41 Display *display = FbTk::App::instance()->display(); 41 Display *display = FbTk::App::instance()->display();
42 42
43 XTextProperty text_prop; 43 XTextProperty text_prop;
44 text_prop.value = 0;
44 char **list; 45 char **list;
45 int num; 46 int num;
46 I18n *i18n = I18n::instance(); 47 I18n *i18n = I18n::instance();
@@ -62,6 +63,9 @@ std::string getWMName(Window window) {
62 63
63 } else 64 } else
64 name = text_prop.value ? (char *)text_prop.value : ""; 65 name = text_prop.value ? (char *)text_prop.value : "";
66
67 XFree(text_prop.value);
68
65 } else { // default name 69 } else { // default name
66 name = i18n->getMessage(FBNLS::WindowSet, FBNLS::WindowUnnamed, 70 name = i18n->getMessage(FBNLS::WindowSet, FBNLS::WindowUnnamed,
67 "Unnamed"); 71 "Unnamed");