Commit e4447f8131581b36262a833396c182faa950cf0c

Ran Benita 2012-03-03T01:17:21

Fix other misc leaks Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/src/xkbcomp/listing.c b/src/xkbcomp/listing.c
index 0fe8288..c0965c7 100644
--- a/src/xkbcomp/listing.c
+++ b/src/xkbcomp/listing.c
@@ -355,6 +355,8 @@ AddDirectory(CompPair *cp, char *head, char *ptrn, char *rest, char *map,
     }
 #ifdef WIN32
     while (FindNextFile(dirh, &file));
+#else
+    closedir(dirp);
 #endif
     return nMatch;
 }
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 95936ab..e452b14 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -349,6 +349,9 @@ MergeKeyGroups(SymbolsInfo * info,
             WSGO("Could not allocate actions for group merge\n");
             ACTION("Group %d of key %s not merged\n", group,
                     longText(into->name));
+            if (resultSyms != into->syms[group] &&
+                resultSyms != from->syms[group])
+                free(resultSyms);
             return False;
         }
     }