summaryrefslogtreecommitdiff
path: root/keycodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'keycodes.c')
-rw-r--r--keycodes.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/keycodes.c b/keycodes.c
index 9603376..8904774 100644
--- a/keycodes.c
+++ b/keycodes.c
@@ -270,8 +270,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
static void
ClearKeyNamesInfo(KeyNamesInfo * info)
{
- if (info->name != NULL)
- free(info->name);
+ free(info->name);
info->name = NULL;
info->computedMax = info->explicitMax = info->explicitMin = -1;
info->computedMin = 256;
@@ -517,8 +516,7 @@ HandleIncludeKeycodes(IncludeStmt * stmt, XkbDescPtr xkb, KeyNamesInfo * info)
HandleKeycodesFile(rtrn, xkb, MergeOverride, &included);
if (stmt->stmt != NULL)
{
- if (included.name != NULL)
- free(included.name);
+ free(included.name);
included.name = stmt->stmt;
stmt->stmt = NULL;
}