summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient/tests
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-04-05 15:11:19 +0200
committerVolker Lendecke <vl@samba.org>2010-04-09 13:15:05 +0200
commita10f024083b25f0b879e9ccd8f53ac370aa22a30 (patch)
tree6ee82b2a51dbe878f1a87f78f0126fdde4c5a7de /nsswitch/libwbclient/tests
parent45d3ac05b3781a8c14e7f4426a515746e9a99172 (diff)
downloadsamba-a10f024083b25f0b879e9ccd8f53ac370aa22a30.tar.gz
samba-a10f024083b25f0b879e9ccd8f53ac370aa22a30.tar.bz2
samba-a10f024083b25f0b879e9ccd8f53ac370aa22a30.zip
libwbclient: Fix some memleaks in the tests
Diffstat (limited to 'nsswitch/libwbclient/tests')
-rw-r--r--nsswitch/libwbclient/tests/wbclient.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/tests/wbclient.c b/nsswitch/libwbclient/tests/wbclient.c
index a63811a8d7..261163c4fc 100644
--- a/nsswitch/libwbclient/tests/wbclient.c
+++ b/nsswitch/libwbclient/tests/wbclient.c
@@ -229,6 +229,8 @@ static bool test_wbc_users(struct torture_context *tctx)
"wbcLookupSid expected WBC_SID_NAME_USER");
torture_assert(tctx, name,
"wbcLookupSid returned no name");
+ wbcFreeMemory(domain);
+ wbcFreeMemory(name);
torture_assert_wbc_ok(tctx, wbcLookupUserSids(&sid, true, &num_sids, &sids),
"wbcLookupUserSids failed");
wbcFreeMemory(sids);
@@ -298,6 +300,8 @@ static bool test_wbc_users_async(struct torture_context *tctx)
"wbcLookupSid expected WBC_SID_NAME_USER");
torture_assert(tctx, name,
"wbcLookupSid returned no name");
+ wbcFreeMemory(domain);
+ wbcFreeMemory(name);
torture_assert_wbc_ok(tctx, wbcLookupUserSids(&sid, true, &num_sids, &sids),
"wbcLookupUserSids failed");
wbcFreeMemory(sids);
@@ -340,6 +344,7 @@ static bool test_wbc_groups(struct torture_context *tctx)
torture_assert(tctx, name,
"wbcLookupSid returned no name");
}
+ wbcFreeMemory(groups);
return true;
}
@@ -453,6 +458,8 @@ static bool test_wbc_resolve_winsbyip(struct torture_context *tctx)
torture_assert_wbc_ok(tctx, ret, "wbcResolveWinsByIP failed");
+ wbcFreeMemory(name);
+
return true;
}