summaryrefslogtreecommitdiff
path: root/xkb/XKBAlloc.c
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2010-11-10 16:06:10 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2010-11-11 08:22:59 +1000
commit99275ad2fa99778afaefc54b62c8638afc59e755 (patch)
tree19e6b6373fe5bd3850c42dc69ff085689807f19c /xkb/XKBAlloc.c
parent9e999d18b004b8ead9c6c5d79b4a3d4bbf0e3152 (diff)
Remove superfluous if(p!=NULL) checks around free(p); p=NULL;
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ - if (E != NULL) { - free(E); ( - E = NULL; | - E = 0; ) - } + free(E); + E = NULL; Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb/XKBAlloc.c')
-rw-r--r--xkb/XKBAlloc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c
index c52e091da..bffd60fce 100644
--- a/xkb/XKBAlloc.c
+++ b/xkb/XKBAlloc.c
@@ -212,10 +212,8 @@ XkbNamesPtr names;
register XkbKeyTypePtr type;
type= map->types;
for (i=0;i<map->num_types;i++,type++) {
- if (type->level_names!=NULL) {
- free(type->level_names);
- type->level_names= NULL;
- }
+ free(type->level_names);
+ type->level_names = NULL;
}
}
}