[SSSD] [PATCH] LDAP: Prevent from using uninitialized sdap_options

Jakub Hrozek jhrozek at redhat.com
Wed Nov 13 14:06:48 UTC 2013


On Wed, Nov 13, 2013 at 08:56:18AM +0100, Lukas Slebodnik wrote:
> ehlo,
> 
> previously, variable "struct sdap_options *opts" was part of bectx
> When ldap_get_options failed in time of ldap backend initialisation
> sdap_options(ctx->opts) remained NULL.
> 
> After refactoring dcb44c39dda9699cdd6488fd116a51ced0687de3
> "LDAP: sdap_id_ctx might contain several connections"
> talloc_free can be called with uninitialised sdap_options opts
> if initial call to ldap_get_options fail.
> 
> I didn't change done section because talloc_free can be safely
> call with NULL pointer.
> 
> Simple patch is attached.
> 
> LS

ACK



More information about the sssd-devel mailing list