[PATCH] rrproviderproperty.c: free newly allocated prop in more error paths
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Jul 14 09:24:20 PDT 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/11/12 03:53 PM, Keith Packard wrote:
> 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?
Ah, yes. I was looking at the newly introduced list (comparing head against
1.12.3) and didn't notice there were existing issues in 1.12 for those. I'll
put those in a separate patch in case someone wants to backport to 1.12 branch.
- --
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (SunOS)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlABnTQACgkQovueCB8tEw59mwCeKyWzinoKaOGrtR7Ktez1h23z
5qAAnilata5OYD4d653hXw3bJm4TsyxR
=vXo0
-----END PGP SIGNATURE-----
More information about the xorg-devel
mailing list