[PATCH v2 3/7] xkb: Fix allocation check to compare correct variable
Pauli Nieminen
ext-pauli.nieminen at nokia.com
Wed Jul 28 12:47:03 PDT 2010
prop->name is allocated in code but check is for parameter name that
can't be NULL.
Fixes:
Cannot reach dead statement "return NULL;"
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
improved commit message
xkb/XKBGAlloc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
index d1adea3..7143e7a 100644
--- a/xkb/XKBGAlloc.c
+++ b/xkb/XKBGAlloc.c
@@ -669,7 +669,7 @@ register XkbPropertyPtr prop;
}
prop= &geom->properties[geom->num_properties];
prop->name= malloc(strlen(name)+1);
- if (!name)
+ if (!prop->name)
return NULL;
strcpy(prop->name,name);
prop->value= malloc(strlen(value)+1);
--
1.6.3.3
More information about the xorg-devel
mailing list