summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2014-09-19 16:28:16 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2014-09-19 16:28:16 +0000
commitada02ea752aa260d339481e1535d828a16f53cd4 (patch)
tree8d0bd3a4061c41f04ba20a445b5ab8a8fbbd20e1
parentd98853628bd853301bf7ebb40e7b6440336f7f7f (diff)
Fix memory leak (STR #3069).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10323 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_x.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 982369758..653938d6b 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -399,8 +399,8 @@ static void fl_new_ic()
XVaNestedList status_attr = NULL;
static XFontSet fs = NULL;
char *fnt;
- char **missing_list;
- int missing_count;
+ char **missing_list = 0;
+ int missing_count = 0;
char *def_string;
static XRectangle spot;
int predit = 0;
@@ -428,6 +428,9 @@ static void fl_new_ic()
if (must_free_fnt) free(fnt);
}
#endif
+
+ if (missing_list) XFreeStringList(missing_list);
+
preedit_attr = XVaCreateNestedList(0,
XNSpotLocation, &spot,
XNFontSet, fs, NULL);