[SSSD] [PATCHES] Improve group handling for subdomain users
Simo Sorce
simo at redhat.com
Thu Nov 8 14:39:07 UTC 2012
On Wed, 2012-11-07 at 13:13 +0100, Sumit Bose wrote:
>
> + if (current_gid_count == 0 && gid_count == 0) {
> + ret = EOK;
> + goto done;
> + }
Also noticed that for this condition you probably want to just assign
and return EOK directly, otherwise ...
> +done:
> +
> + if (ret == EOK) {
> + *_add_gid_count = add_gid_count;
> + *_add_gids = talloc_steal(mem_ctx, add_gids);
> + *_del_gid_count = del_gid_count;
> + *_del_gids = talloc_steal(mem_ctx, del_gids);
> + }
> +
> + talloc_free(tmp_ctx);
> +
> + return ret;
> +}
... here you try to steal NULL pointers and free a NULL context.
talloc_steal and talloc_free do not crash if you pass NULL, but it is
strange to see all this done when clearly you never set anything in
there.
Not fatal, if you feel strongly that jumping to done is better I am ok
with it too.
Simo.
--
Simo Sorce * Red Hat, Inc * New York
More information about the sssd-devel
mailing list