dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone
Blob Blame History Raw
From 8894f5214c20e530c15a7481ed0b84e533cef519 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
Date: Fri, 1 Nov 2013 13:17:17 +0100
Subject: [PATCH 20/31] free idmapped dom SIDs correctly

Resolves:
https://fedorahosted.org/sssd/ticket/2133
---
 src/tests/sss_idmap-tests.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/tests/sss_idmap-tests.c b/src/tests/sss_idmap-tests.c
index b2de0e70f794414587080587af1fd4a06d5ae854..c43e326b1f49ac74c387c76e58f2f32efdce40ff 100644
--- a/src/tests/sss_idmap-tests.c
+++ b/src/tests/sss_idmap-tests.c
@@ -261,7 +261,7 @@ START_TEST(idmap_test_dom_sid2uid)
                 "sss_idmap_dom_sid_to_unix returned wrong id, "
                 "got [%d], expected [%d].", id, 1000 + IDMAP_RANGE_MIN);
 
-    talloc_free(dom_sid);
+    sss_idmap_free_dom_sid(idmap_ctx, dom_sid);
 }
 END_TEST
 
@@ -305,7 +305,7 @@ START_TEST(idmap_test_uid2dom_sid)
                 "expected [%s], got [%s].", "S-1-5-21-1-2-3-1000", sid);
 
     sss_idmap_free_sid(idmap_ctx, sid);
-    talloc_free(dom_sid);
+    sss_idmap_free_dom_sid(idmap_ctx, dom_sid);
 }
 END_TEST
 
@@ -358,7 +358,7 @@ START_TEST(idmap_test_bin_sid2dom_sid)
     fail_unless(memcmp(test_bin_sid, new_bin_sid, test_bin_sid_length) == 0,
                 "Binary SIDs do not match.");
 
-    talloc_free(dom_sid);
+    sss_idmap_free_dom_sid(idmap_ctx, dom_sid);
     talloc_free(new_bin_sid);
 }
 END_TEST
@@ -384,7 +384,7 @@ START_TEST(idmap_test_sid2dom_sid)
     fail_unless(strcmp("S-1-5-21-1-2-3-1000", new_sid) == 0,
                 "SID strings do not match.");
 
-    talloc_free(dom_sid);
+    sss_idmap_free_dom_sid(idmap_ctx, dom_sid);
     sss_idmap_free_sid(idmap_ctx, new_sid);
 }
 END_TEST
@@ -417,7 +417,7 @@ START_TEST(idmap_test_large_and_too_large_sid)
                 "Trying to convert  a SID with a too large component "
                 "did not return IDMAP_SID_INVALID");
 
-    talloc_free(dom_sid);
+    sss_idmap_free_dom_sid(idmap_ctx, dom_sid);
     sss_idmap_free_sid(idmap_ctx, new_sid);
 }
 END_TEST
@@ -475,7 +475,7 @@ START_TEST(idmap_test_smb_sid2dom_sid)
     fail_unless(memcmp(&test_smb_sid, new_smb_sid, sizeof(struct dom_sid)) == 0,
                 "Samba dom_sid-s do not match.");
 
-    talloc_free(dom_sid);
+    sss_idmap_free_dom_sid(idmap_ctx, dom_sid);
     talloc_free(new_smb_sid);
 }
 END_TEST
-- 
1.8.4.2