summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
Diffstat (limited to 'dix')
-rw-r--r--dix/atom.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dix/atom.c b/dix/atom.c
index ecfe4b0c7..6910dd5d1 100644
--- a/dix/atom.c
+++ b/dix/atom.c
@@ -180,8 +180,13 @@ FreeAtom(NodePtr patom)
FreeAtom(patom->left);
if(patom->right)
FreeAtom(patom->right);
- if (patom->a > XA_LAST_PREDEFINED)
- free(patom->string);
+ if (patom->a > XA_LAST_PREDEFINED) {
+ /*
+ * All strings above XA_LAST_PREDEFINED are strdup'ed, so it's safe to
+ * cast here
+ */
+ free((char *)patom->string);
+ }
free(patom);
}