[PATCH] rrproviderproperty.c: free newly allocated prop in more error paths

Keith Packard keithp at keithp.com
Wed Jul 11 15:53:37 PDT 2012


Alan Coopersmith <alan.coopersmith at oracle.com> writes:

> Reported by parfait 1.0:
>
> Error: Memory leak (CWE 401)
>    Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property)
>         at line 221 of randr/rrproviderproperty.c in function 'RRChangeProviderProperty'.
>           'prop' allocated at line 155 with RRCreateProviderProperty(property).
>           prop leaks when pending != 0 at line 161.
>
> Error: Memory leak (CWE 401)
>    Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property)
>         at line 345 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'.
>           'prop' allocated at line 333 with RRCreateProviderProperty(property).
>         at line 349 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'.
>           'prop' allocated at line 333 with RRCreateProviderProperty(property).
>
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

Looks like there are similar errors in rrproperty.c?

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120711/947e7d21/attachment.pgp>


More information about the xorg-devel mailing list