summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-11-01 13:17:17 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-12-19 20:10:12 +0100
commit8894f5214c20e530c15a7481ed0b84e533cef519 (patch)
treebaeadf6abccdf54aa5cfebf390578d8bb141e4ea
parent9fad27b40eff82bcdffa61cafcc54e2d7750faee (diff)
downloadsssd-8894f5214c20e530c15a7481ed0b84e533cef519.tar.gz
sssd-8894f5214c20e530c15a7481ed0b84e533cef519.tar.xz
sssd-8894f5214c20e530c15a7481ed0b84e533cef519.zip
free idmapped dom SIDs correctly
Resolves: https://fedorahosted.org/sssd/ticket/2133
-rw-r--r--src/tests/sss_idmap-tests.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tests/sss_idmap-tests.c b/src/tests/sss_idmap-tests.c
index b2de0e70f..c43e326b1 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