[SSSD] [PATCHES] SYSDB: memory leaks

Stephen Gallagher sgallagh at redhat.com
Thu Jun 19 14:37:19 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/19/2014 07:48 AM, Pavel Reichl wrote:
> Hello,
> 
> I noticed 2 little memory leaks in SYSDB, I believe they aren't
> serious as they are probably handled on higher level, but I believe
> they should be fixed anyway.
> 
> 1st patch adds check on memory leaks to one of SYSDB test. This
> test will fail unless 2nd and 3rd patch are applied.


Patch 0001: Ack
Patch 0002: Ack

Patch 0003: Nack

I'd prefer that you either add a tmp_ctx here and allocate basedn on
that or just allocate it directly on NULL, rather than mem_ctx. We
should stick with the pattern of *never* allocating memory that isn't
being returned to the parent on the parent context. It is *very*
difficult to catch leaks that way (particularly if the parent context
ends up being very long-lived).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlOi9Z8ACgkQeiVVYja6o6Pw9ACfajNe0ETZAPX0xtD0qHF6C3T2
A4MAnAxgG4vlN3CjSylHBRSUs3pz0jZC
=FLIY
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list