[PATCH 2/3] rrproperty.c: free newly allocated prop in more error paths

Keith Packard keithp at keithp.com
Wed Jul 25 09:16:36 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 RRCreateOutputProperty(property)
>         at line 220 of randr/rrproperty.c in function 'RRChangeOutputProperty'.
>           'prop' allocated at line 154 with RRCreateOutputProperty(property).
>           prop leaks when pending != 0 at line 160.
> Error: Memory leak (CWE 401)
>    Memory leak of pointer 'prop' allocated with RRCreateOutputProperty(property)
>         at line 346 of randr/rrproperty.c in function 'RRConfigureOutputProperty'.
>           'prop' allocated at line 334 with RRCreateOutputProperty(property).
>         at line 350 of randr/rrproperty.c in function 'RRConfigureOutputProperty'.
>           'prop' allocated at line 334 with RRCreateOutputProperty(property).

Reviewed-by: Keith Packard <keithp at keithp.com>

-- 
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/20120725/445b6e4d/attachment-0001.pgp>


More information about the xorg-devel mailing list