[PATCH 2/2] Make sure XFixes invisible cursor gets freed on server reset

Jamey Sharp jamey at minilop.net
Fri Apr 30 22:26:50 PDT 2010


On Fri, Apr 30, 2010 at 4:13 PM, Keith Packard <keithp at keithp.com> wrote:
> +    if (AllocARGBCursor(psrcbits, pmaskbits,
> +                       NULL, &cm,
> +                       0, 0, 0,
> +                       0, 0, 0,
> +                       &pCursor, serverClient, (XID)0) != Success)
> +       return NullCursor;
> +
> +    if (!AddResource(FakeClientID(0), RT_CURSOR, (pointer) pCursor))
> +       return NullCursor;

To what extent do people care if error paths like this leak memory?
Should the AddResource failure free pCursor?

I'm sure it hardly matters in *this* case but I wondered if this is
something we should pay attention to on patch review.

Jamey


More information about the xorg-devel mailing list