diff options
-rw-r--r-- | dix/property.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/dix/property.c b/dix/property.c index 20c18d74a..10b8482b4 100644 --- a/dix/property.c +++ b/dix/property.c @@ -351,9 +351,14 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, access_mode |= DixPostAccess; rc = XaceHookPropertyAccess(pClient, pWin, &pProp, access_mode); if (rc == Success) - xfree(savedProp.data); - else { - xfree(pProp->data); + { + if (savedProp.data != pProp->data) + xfree(savedProp.data); + } + else + { + if (savedProp.data != pProp->data) + xfree(pProp->data); *pProp = savedProp; return rc; } |