On 11/10/2015 08:37 AM, Lukas Slebodnik wrote:
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

Right, I will change void *tmp_ctx to TALLOC_CTX *tmp_ctx and I will create it under req_mem_ctx. I feel it will be more clear and readable.

Petr
_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to