Don't leak the various *Info's names when overriding them Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index 6dcabbc..cdb0785 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -702,6 +702,7 @@ HandleCompatMapFile(XkbFile * file,
if (merge == MergeDefault)
merge = MergeAugment;
+ free(info->name);
info->name = _XkbDupString(file->name);
stmt = file->defs;
while (stmt)
diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
index b90b595..8c31b6f 100644
--- a/src/xkbcomp/geometry.c
+++ b/src/xkbcomp/geometry.c
@@ -2840,6 +2840,7 @@ HandleGeometryFile(XkbFile * file,
if (merge == MergeDefault)
merge = MergeAugment;
+ free(info->name);
info->name = _XkbDupString(file->name);
stmt = file->defs;
while (stmt)
diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index fe97d62..69f87d1 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -798,6 +798,7 @@ HandleKeycodesFile(XkbFile * file,
{
ParseCommon *stmt;
+ free(info->name);
info->name = _XkbDupString(file->name);
stmt = file->defs;
while (stmt)
diff --git a/src/xkbcomp/keytypes.c b/src/xkbcomp/keytypes.c
index fd49271..b0a1b11 100644
--- a/src/xkbcomp/keytypes.c
+++ b/src/xkbcomp/keytypes.c
@@ -1028,6 +1028,7 @@ HandleKeyTypesFile(XkbFile * file,
{
ParseCommon *stmt;
+ free(info->name);
info->name = _XkbDupString(file->name);
stmt = file->defs;
while (stmt)
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 416447e..95936ab 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -1579,6 +1579,7 @@ HandleSymbolsFile(XkbFile * file,
{
ParseCommon *stmt;
+ free(info->name);
info->name = _XkbDupString(file->name);
stmt = file->defs;
while (stmt)