RRModeCreate: also free mode in error case.

Mihai Moldovan ionic at ionic.de
Thu Jul 2 19:28:24 PDT 2015


On 01.07.2015 04:58 PM, Adam Jackson wrote:
> On failure, AddResource calls the deleteFunc for the given type and
> value.  Here, that's RRModeDestroyResource, which already does
> free(mode) as the last step.  So this patch would introduce a double
> -free.

It does indeed. But only because the ref count is hardcoded to 1...

I haven't checked what AddResource does, probably a big mistake.

Feel free to mark the patch as rejected.



Mihai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150703/63f07ad9/attachment.sig>


More information about the xorg-devel mailing list