[SSSD] [PATCH] sdap_get_ad_tokengroups_initgroups_lookup_done(): fix group_name may be uninitialized warning

Jakub Hrozek jhrozek at redhat.com
Mon Sep 24 16:17:30 UTC 2012


On Mon, Sep 24, 2012 at 11:32:52AM -0400, Stephen Gallagher wrote:
> On Mon 24 Sep 2012 11:24:59 AM EDT, Stephen Gallagher wrote:
> >On Mon 24 Sep 2012 11:01:20 AM EDT, Pavel Březina wrote:
> >>Recent AD patches introduced another warning.
> >>
> >>If I read the code correctly it is safe to just initialize the
> >>variable to NULL.
> >>
> >
> >Nack, this would not be safe. We would then be attempting to
> >talloc_strdup() the NULL value at line 367. What is actually wrong
> >here is that the error check from sysdb_search_group_by_gid() needs to
> >fail if it returns anything but EOK or ENOENT, which I forgot to
> >include. Falling through below is bad.
> >
> >Thanks for catching that.
> 
> 
> Whoops, forgot to attach the patch.

Ack and pushed to master.



More information about the sssd-devel mailing list