URL:
https://github.com/SSSD/sssd/pull/517
Title: #517: Fix two memory leaks in the AD provider
jhrozek commented:
"""
I think the patches look good in general, but the tests don't compile at the moment:
```
/home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_ad_common.c: In function
‘test_user_conn_list’:
/home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_ad_common.c:775:35: warning: passing
argument 2 of ‘ad_user_conn_list’ from incompatible pointer type
[-Wincompatible-pointer-types]
test_ctx->dom);
^~~~~~~~
In file included from
/home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_ad_common.c:40:0:
/home/remote/jhrozek/devel/sssd/src/providers/ad/ad_common.c:1405:1: note: expected
‘struct ad_id_ctx *’ but argument is of type ‘struct sss_domain_info *’
ad_user_conn_list(TALLOC_CTX *mem_ctx,
^~~~~~~~~~~~~~~~~
/home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_ad_common.c:774:17: error: too few
arguments to function ‘ad_user_conn_list’
conn_list = ad_user_conn_list(test_ctx->ad_ctx,
^~~~~~~~~~~~~~~~~
In file included from
/home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_ad_common.c:40:0:
/home/remote/jhrozek/devel/sssd/src/providers/ad/ad_common.c:1405:1: note: declared here
ad_user_conn_list(TALLOC_CTX *mem_ctx,
^~~~~~~~~~~~~~~~~
/home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_ad_common.c:784:35: warning: passing
argument 2 of ‘ad_user_conn_list’ from incompatible pointer type
[-Wincompatible-pointer-types]
test_ctx->subdom);
^~~~~~~~
In file included from
/home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_ad_common.c:40:0:
/home/remote/jhrozek/devel/sssd/src/providers/ad/ad_common.c:1405:1: note: expected
‘struct ad_id_ctx *’ but argument is of type ‘struct sss_domain_info *’
ad_user_conn_list(TALLOC_CTX *mem_ctx,
^~~~~~~~~~~~~~~~~
/home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_ad_common.c:783:17: error: too few
arguments to function ‘ad_user_conn_list’
conn_list = ad_user_conn_list(test_ctx->ad_ctx,
^~~~~~~~~~~~~~~~~
In file included from
/home/remote/jhrozek/devel/sssd/src/tests/cmocka/test_ad_common.c:40:0:
/home/remote/jhrozek/devel/sssd/src/providers/ad/ad_common.c:1405:1: note: declared here
ad_user_conn_list(TALLOC_CTX *mem_ctx,
^~~~~~~~~~~~~~~~~
```
"""
See the full comment at
https://github.com/SSSD/sssd/pull/517#issuecomment-366674462