Commit f44eed3e9ad366c816a90d749a5f3bde9239119e

Daniel Stone 2012-03-21T00:33:29

Remove unnecessary allocation in expr.c Signed-off-by: Daniel Stone <daniel@fooishbar.org>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
 }