diff options
-rw-r--r-- | xfixes/cursor.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 5619aad2e..10f9b2346 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -774,10 +774,8 @@ createCursorHideCount(ClientPtr pClient, ScreenPtr pScreen) * Create a resource for this element so it can be deleted * when the client goes away. */ - if (!AddResource(pChc->resource, CursorHideCountType, (void *) pChc)) { - free(pChc); + if (!AddResource(pChc->resource, CursorHideCountType, (void *) pChc)) return BadAlloc; - } return Success; } |