[SSSD] [PATCH] TEST: recent_valid filter testing
Lukas Slebodnik
lslebodn at redhat.com
Tue Nov 10 07:37:13 UTC 2015
On (10/11/15 08:29), Pavel Reichl wrote:
>
>
>On 11/05/2015 05:29 PM, Petr Cech wrote:
>>+void test_groups_by_recent_filter_valid(void **state)
>>+{
>>+ struct cache_req_test_ctx *test_ctx = NULL;
>>+ TALLOC_CTX *req_mem_ctx = NULL;
>>+ struct tevent_req *req = NULL;
>>+ const char **group_names = NULL;
>>+ const char **ldb_results = NULL;
>>+ const char *ldbname = NULL;
>>+ void *tmp_ctx = NULL;
>Could you use TALLOC_CTX?
>
Why do we need two different talloc context in a test?
"TALLOC_CTX *req_mem_ctx", "void *tmp_ctx"
If we properly release resources we can use single talloc context.
It's the best way how to catch memory leaks.
LS
More information about the sssd-devel
mailing list