Commit eb8c96cbd99f5facbeb73c9b10fc4d592e4c547b

Daniel Stone 2012-02-15T16:42:45

Don't leak SymbolsInfo Signed-off-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 2de160c..cbf3bd6 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -2211,8 +2211,11 @@ CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
     info.dflt.defs.merge = merge;
     HandleSymbolsFile(file, xkb, merge, &info);
 
-    if (info.nKeys == 0)
+    if (info.nKeys == 0) {
+        FreeSymbolsInfo(&info);
         return True;
+    }
+
     if (info.errorCount == 0)
     {
         KeyInfo *key;
@@ -2292,7 +2295,10 @@ CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
                 next = (ModMapEntry *) mm->defs.next;
             }
         }
+        FreeSymbolsInfo(&info);
         return True;
     }
+
+    FreeSymbolsInfo(&info);
     return False;
 }