summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-04-04 22:49:18 +0200
committerVolker Lendecke <vl@samba.org>2010-04-04 23:22:52 +0200
commit50a625ce0edc13312030d24df4b0b7eeaa50bfb0 (patch)
tree2edc326c96a0b56f684c69a49370f72a72ecd8d7
parentb1b723da6f7545f387ab64eb4ad2df2cf59e2623 (diff)
downloadsamba-50a625ce0edc13312030d24df4b0b7eeaa50bfb0.tar.gz
samba-50a625ce0edc13312030d24df4b0b7eeaa50bfb0.tar.bz2
samba-50a625ce0edc13312030d24df4b0b7eeaa50bfb0.zip
libwbclient: Fix memleaks in tests
-rw-r--r--nsswitch/libwbclient/tests/wbclient.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/tests/wbclient.c b/nsswitch/libwbclient/tests/wbclient.c
index 007404024d..a63811a8d7 100644
--- a/nsswitch/libwbclient/tests/wbclient.c
+++ b/nsswitch/libwbclient/tests/wbclient.c
@@ -149,6 +149,7 @@ static bool test_wbc_sidtostring(struct torture_context *tctx)
"wbcSidToString failed");
torture_assert_str_equal(tctx, sid_string, sid_string2,
"sid strings differ");
+ wbcFreeMemory(sid_string2);
return true;
}
@@ -165,6 +166,7 @@ static bool test_wbc_guidtostring(struct torture_context *tctx)
"wbcGuidToString failed");
torture_assert_str_equal(tctx, guid_string, guid_string2,
"guid strings differ");
+ wbcFreeMemory(guid_string2);
return true;
}
@@ -185,6 +187,7 @@ static bool test_wbc_domain_info(struct torture_context *tctx)
"wbcDomainInfo failed");
torture_assert(tctx, info,
"wbcDomainInfo returned NULL pointer");
+ wbcFreeMemory(info);
return true;
}
@@ -228,7 +231,9 @@ static bool test_wbc_users(struct torture_context *tctx)
"wbcLookupSid returned no name");
torture_assert_wbc_ok(tctx, wbcLookupUserSids(&sid, true, &num_sids, &sids),
"wbcLookupUserSids failed");
+ wbcFreeMemory(sids);
}
+ wbcFreeMemory(users);
return true;
}
@@ -295,7 +300,9 @@ static bool test_wbc_users_async(struct torture_context *tctx)
"wbcLookupSid returned no name");
torture_assert_wbc_ok(tctx, wbcLookupUserSids(&sid, true, &num_sids, &sids),
"wbcLookupUserSids failed");
+ wbcFreeMemory(sids);
}
+ wbcFreeMemory(users);
return true;
}
@@ -372,6 +379,7 @@ static bool test_wbc_trusts(struct torture_context *tctx)
"wbcLookupSid returned no name");
*/
}
+ wbcFreeMemory(domains);
return true;
}
@@ -390,6 +398,7 @@ static bool test_wbc_lookupdc(struct torture_context *tctx)
torture_assert_wbc_ok(tctx, wbcLookupDomainController(domain_name, 0, &dc_info),
"wbcLookupDomainController failed");
+ wbcFreeMemory(dc_info);
return true;
}
@@ -408,6 +417,7 @@ static bool test_wbc_lookupdcex(struct torture_context *tctx)
torture_assert_wbc_ok(tctx, wbcLookupDomainControllerEx(domain_name, NULL, NULL, 0, &dc_info),
"wbcLookupDomainControllerEx failed");
+ wbcFreeMemory(dc_info);
return true;
}