diff options
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/XKBMAlloc.c | 6 | ||||
-rw-r--r-- | xkb/ddxLoad.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c index e85a8af95..2681ba3c3 100644 --- a/xkb/XKBMAlloc.c +++ b/xkb/XKBMAlloc.c @@ -292,11 +292,9 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; } type= &xkb->map->types[type_ndx]; if (map_count==0) { - if (type->map!=NULL) - free(type->map); + free(type->map); type->map= NULL; - if (type->preserve!=NULL) - free(type->preserve); + free(type->preserve); type->preserve= NULL; type->map_count= 0; } diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index 5e6ab8770..cfc6198fd 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -267,8 +267,7 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, strncpy(nameRtrn,keymap,nameRtrnLen); nameRtrn[nameRtrnLen-1]= '\0'; } - if (buf != NULL) - free(buf); + free(buf); return TRUE; } else @@ -287,8 +286,7 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, } if (nameRtrn) nameRtrn[0]= '\0'; - if (buf != NULL) - free(buf); + free(buf); return FALSE; } |