Fix a memory leak
authorAkira TAGOH <akira@tagoh.org>
Tue, 5 Mar 2013 03:46:01 +0000 (12:46 +0900)
committerAkira TAGOH <akira@tagoh.org>
Tue, 5 Mar 2013 03:46:01 +0000 (12:46 +0900)
src/fclang.c

index 8e9b094..9f685f6 100644 (file)
@@ -1027,9 +1027,11 @@ FcLangSetOperate(const FcLangSet *a,
                                                 const FcChar8  *s))
 {
     FcLangSet  *langset = FcLangSetCopy (a);
-    FcStrList  *sl = FcStrListCreate (FcLangSetGetLangs (b));
+    FcStrSet   *set = FcLangSetGetLangs (b);
+    FcStrList  *sl = FcStrListCreate (set);
     FcChar8    *str;
 
+    FcStrSetDestroy (set);
     while ((str = FcStrListNext (sl)))
     {
        func (langset, str);