aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/XKBGAlloc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-14 21:29:32 +0000
committermarha <marha@users.sourceforge.net>2010-11-14 21:29:32 +0000
commit3425b16d521b8846b95df2b7d32a548d93341f3b (patch)
treefa430e95285d90f990b2d5574dad1e409ba5980c /xorg-server/xkb/XKBGAlloc.c
parent41c64098a90b4e974d5005a1619472f2e8a64ea1 (diff)
downloadvcxsrv-3425b16d521b8846b95df2b7d32a548d93341f3b.tar.gz
vcxsrv-3425b16d521b8846b95df2b7d32a548d93341f3b.tar.bz2
vcxsrv-3425b16d521b8846b95df2b7d32a548d93341f3b.zip
xserver pixman libX11 libXext 14/11/2010
Diffstat (limited to 'xorg-server/xkb/XKBGAlloc.c')
-rw-r--r--xorg-server/xkb/XKBGAlloc.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/xorg-server/xkb/XKBGAlloc.c b/xorg-server/xkb/XKBGAlloc.c
index a6d10c4b0..d5e49349e 100644
--- a/xorg-server/xkb/XKBGAlloc.c
+++ b/xorg-server/xkb/XKBGAlloc.c
@@ -50,10 +50,8 @@ _XkbFreeGeomLeafElems( Bool freeAll,
{
if ((freeAll)||(*elems==NULL)) {
*num_inout= *sz_inout= 0;
- if (*elems!=NULL) {
- free(*elems);
- *elems= NULL;
- }
+ free(*elems);
+ *elems = NULL;
return;
}
@@ -373,22 +371,16 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in;
switch (doodad->any.type) {
case XkbTextDoodad:
{
- if (doodad->text.text!=NULL) {
- free(doodad->text.text);
- doodad->text.text= NULL;
- }
- if (doodad->text.font!=NULL) {
- free(doodad->text.font);
- doodad->text.font= NULL;
- }
+ free(doodad->text.text);
+ doodad->text.text = NULL;
+ free(doodad->text.font);
+ doodad->text.font = NULL;
}
break;
case XkbLogoDoodad:
{
- if (doodad->logo.logo_name!=NULL) {
- free(doodad->logo.logo_name);
- doodad->logo.logo_name= NULL;
- }
+ free(doodad->logo.logo_name);
+ doodad->logo.logo_name = NULL;
}
break;
}
@@ -434,10 +426,8 @@ XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap)
if ((which&XkbGeomKeyAliasesMask)&&(geom->key_aliases!=NULL))
XkbFreeGeomKeyAliases(geom,0,geom->num_key_aliases,TRUE);
if (freeMap) {
- if (geom->label_font!=NULL) {
- free(geom->label_font);
- geom->label_font= NULL;
- }
+ free(geom->label_font);
+ geom->label_font = NULL;
free(geom);
}
return;