Remove unnecessary allocation in expr.c Signed-off-by: Daniel Stone <daniel@fooishbar.org>
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index e4b0569..791d28e 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -214,7 +214,7 @@ LookupModMask(const void * priv, xkb_atom_t field, unsigned type,
if (type != TypeInt)
return False;
- str = XkbcAtomGetString(field);
+ str = XkbcAtomText(field);
if (str == NULL)
return False;
if (uStrCaseCmp(str, "all") == 0)
@@ -225,7 +225,6 @@ LookupModMask(const void * priv, xkb_atom_t field, unsigned type,
val_rtrn->uval = (1 << val_rtrn->uval);
else
ret = False;
- free(str);
return ret;
}