Blame SOURCES/0102-AD-sdap_get_ad_tokengroups_done-allocate-temporary-d.patch

9f2ebf
From f6f8fca59937b746b3c47cf0aeb23ea554a43fab Mon Sep 17 00:00:00 2001
9f2ebf
From: Sumit Bose <sbose@redhat.com>
9f2ebf
Date: Fri, 16 Feb 2018 12:07:28 +0100
9f2ebf
Subject: [PATCH] AD: sdap_get_ad_tokengroups_done() allocate temporary data on
9f2ebf
 state
9f2ebf
9f2ebf
Related to https://pagure.io/SSSD/sssd/issue/3639
9f2ebf
9f2ebf
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
9f2ebf
(cherry picked from commit db52090e33b8f1747b7d77bab64ab8c9f9f5ecc2)
9f2ebf
---
9f2ebf
 src/providers/ldap/sdap_async_initgroups_ad.c | 5 +----
9f2ebf
 1 file changed, 1 insertion(+), 4 deletions(-)
9f2ebf
9f2ebf
diff --git a/src/providers/ldap/sdap_async_initgroups_ad.c b/src/providers/ldap/sdap_async_initgroups_ad.c
9f2ebf
index 61aa69a2dfbe22cac37a5b7fddc07473527e5de5..ee0cd6707924b02d239ce4c329d9853268d49a80 100644
9f2ebf
--- a/src/providers/ldap/sdap_async_initgroups_ad.c
9f2ebf
+++ b/src/providers/ldap/sdap_async_initgroups_ad.c
9f2ebf
@@ -372,7 +372,6 @@ immediately:
9f2ebf
 
9f2ebf
 static void sdap_get_ad_tokengroups_done(struct tevent_req *subreq)
9f2ebf
 {
9f2ebf
-    TALLOC_CTX *tmp_ctx = NULL;
9f2ebf
     struct sdap_get_ad_tokengroups_state *state = NULL;
9f2ebf
     struct tevent_req *req = NULL;
9f2ebf
     struct sysdb_attrs **users = NULL;
9f2ebf
@@ -386,7 +385,7 @@ static void sdap_get_ad_tokengroups_done(struct tevent_req *subreq)
9f2ebf
     req = tevent_req_callback_data(subreq, struct tevent_req);
9f2ebf
     state = tevent_req_data(req, struct sdap_get_ad_tokengroups_state);
9f2ebf
 
9f2ebf
-    ret = sdap_get_generic_recv(subreq, tmp_ctx, &num_users, &users);
9f2ebf
+    ret = sdap_get_generic_recv(subreq, state, &num_users, &users);
9f2ebf
     talloc_zfree(subreq);
9f2ebf
     if (ret != EOK) {
9f2ebf
         DEBUG(SSSDBG_MINOR_FAILURE,
9f2ebf
@@ -449,8 +448,6 @@ static void sdap_get_ad_tokengroups_done(struct tevent_req *subreq)
9f2ebf
     ret = EOK;
9f2ebf
 
9f2ebf
 done:
9f2ebf
-    talloc_free(tmp_ctx);
9f2ebf
-
9f2ebf
     if (ret != EOK) {
9f2ebf
         tevent_req_error(req, ret);
9f2ebf
         return;
9f2ebf
-- 
9f2ebf
2.14.3
9f2ebf