From ada02ea752aa260d339481e1535d828a16f53cd4 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Fri, 19 Sep 2014 16:28:16 +0000 Subject: [PATCH] Fix memory leak (STR #3069). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10323 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_x.cxx | 7 +++++-- 1 file 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);