mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
libwbclient: Fix some memleaks in the tests
This commit is contained in:
@ -229,6 +229,8 @@ static bool test_wbc_users(struct torture_context *tctx)
|
|||||||
"wbcLookupSid expected WBC_SID_NAME_USER");
|
"wbcLookupSid expected WBC_SID_NAME_USER");
|
||||||
torture_assert(tctx, name,
|
torture_assert(tctx, name,
|
||||||
"wbcLookupSid returned no name");
|
"wbcLookupSid returned no name");
|
||||||
|
wbcFreeMemory(domain);
|
||||||
|
wbcFreeMemory(name);
|
||||||
torture_assert_wbc_ok(tctx, wbcLookupUserSids(&sid, true, &num_sids, &sids),
|
torture_assert_wbc_ok(tctx, wbcLookupUserSids(&sid, true, &num_sids, &sids),
|
||||||
"wbcLookupUserSids failed");
|
"wbcLookupUserSids failed");
|
||||||
wbcFreeMemory(sids);
|
wbcFreeMemory(sids);
|
||||||
@ -298,6 +300,8 @@ static bool test_wbc_users_async(struct torture_context *tctx)
|
|||||||
"wbcLookupSid expected WBC_SID_NAME_USER");
|
"wbcLookupSid expected WBC_SID_NAME_USER");
|
||||||
torture_assert(tctx, name,
|
torture_assert(tctx, name,
|
||||||
"wbcLookupSid returned no name");
|
"wbcLookupSid returned no name");
|
||||||
|
wbcFreeMemory(domain);
|
||||||
|
wbcFreeMemory(name);
|
||||||
torture_assert_wbc_ok(tctx, wbcLookupUserSids(&sid, true, &num_sids, &sids),
|
torture_assert_wbc_ok(tctx, wbcLookupUserSids(&sid, true, &num_sids, &sids),
|
||||||
"wbcLookupUserSids failed");
|
"wbcLookupUserSids failed");
|
||||||
wbcFreeMemory(sids);
|
wbcFreeMemory(sids);
|
||||||
@ -340,6 +344,7 @@ static bool test_wbc_groups(struct torture_context *tctx)
|
|||||||
torture_assert(tctx, name,
|
torture_assert(tctx, name,
|
||||||
"wbcLookupSid returned no name");
|
"wbcLookupSid returned no name");
|
||||||
}
|
}
|
||||||
|
wbcFreeMemory(groups);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -453,6 +458,8 @@ static bool test_wbc_resolve_winsbyip(struct torture_context *tctx)
|
|||||||
|
|
||||||
torture_assert_wbc_ok(tctx, ret, "wbcResolveWinsByIP failed");
|
torture_assert_wbc_ok(tctx, ret, "wbcResolveWinsByIP failed");
|
||||||
|
|
||||||
|
wbcFreeMemory(name);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user