diff options
Diffstat (limited to 'source3/utils/net_ads.c')
-rw-r--r-- | source3/utils/net_ads.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 2a66619438..8e927becbe 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -503,9 +503,9 @@ static int ads_user_add(struct net_context *c, int argc, const char **argv) ads_msgfree(ads, res); status=ads_find_user_acct(ads, &res, argv[0]); if (ADS_ERR_OK(status)) { - userdn = ads_get_dn(ads, res); + userdn = ads_get_dn(ads, talloc_tos(), res); ads_del_dn(ads, userdn); - ads_memfree(ads, userdn); + TALLOC_FREE(userdn); } done: @@ -598,10 +598,10 @@ static int ads_user_delete(struct net_context *c, int argc, const char **argv) ads_destroy(&ads); return -1; } - userdn = ads_get_dn(ads, res); + userdn = ads_get_dn(ads, talloc_tos(), res); ads_msgfree(ads, res); rc = ads_del_dn(ads, userdn); - ads_memfree(ads, userdn); + TALLOC_FREE(userdn); if (ADS_ERR_OK(rc)) { d_printf("User %s deleted\n", argv[0]); ads_destroy(&ads); @@ -757,10 +757,10 @@ static int ads_group_delete(struct net_context *c, int argc, const char **argv) ads_destroy(&ads); return -1; } - groupdn = ads_get_dn(ads, res); + groupdn = ads_get_dn(ads, talloc_tos(), res); ads_msgfree(ads, res); rc = ads_del_dn(ads, groupdn); - ads_memfree(ads, groupdn); + TALLOC_FREE(groupdn); if (ADS_ERR_OK(rc)) { d_printf("Group %s deleted\n", argv[0]); ads_destroy(&ads); @@ -1740,10 +1740,10 @@ static int net_ads_printer_remove(struct net_context *c, int argc, const char ** return -1; } - prt_dn = ads_get_dn(ads, res); + prt_dn = ads_get_dn(ads, talloc_tos(), res); ads_msgfree(ads, res); rc = ads_del_dn(ads, prt_dn); - ads_memfree(ads, prt_dn); + TALLOC_FREE(prt_dn); if (!ADS_ERR_OK(rc)) { d_fprintf(stderr, "ads_del_dn: %s\n", ads_errstr(rc)); |