diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-08-15 17:12:46 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-08-19 16:34:56 +1000 |
commit | 4201d6fd68b382208395b806b77b70e5e1be8d4a (patch) | |
tree | e11948993afb08457bdbdd25891114876c95efce /source3/utils | |
parent | a6d06c069734cae037105350982545b6a964bbd8 (diff) | |
download | samba-4201d6fd68b382208395b806b77b70e5e1be8d4a.tar.gz samba-4201d6fd68b382208395b806b77b70e5e1be8d4a.tar.bz2 samba-4201d6fd68b382208395b806b77b70e5e1be8d4a.zip |
s3-passdb: Replace SMB_MALLOC_ARRAY()/SAFE_FREE() with talloc equivalents.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_sam.c | 13 | ||||
-rw-r--r-- | source3/utils/pdbedit.c | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c index 4754fb0f34..467e441f60 100644 --- a/source3/utils/net_sam.c +++ b/source3/utils/net_sam.c @@ -499,7 +499,7 @@ static int net_sam_policy_set(struct net_context *c, int argc, const char **argv const char **names; int i, count; - account_policy_names_list(&names, &count); + account_policy_names_list(talloc_tos(), &names, &count); d_fprintf(stderr, _("No account policy \"%s\"!\n\n"), argv[0]); d_fprintf(stderr, _("Valid account policies are:\n")); @@ -507,7 +507,8 @@ static int net_sam_policy_set(struct net_context *c, int argc, const char **argv d_fprintf(stderr, "%s\n", names[i]); } - SAFE_FREE(names); + TALLOC_FREE(names); + return -1; } @@ -551,7 +552,7 @@ static int net_sam_policy_show(struct net_context *c, int argc, const char **arg const char **names; int count; int i; - account_policy_names_list(&names, &count); + account_policy_names_list(talloc_tos(), &names, &count); d_fprintf(stderr, _("No account policy by that name!\n")); if (count != 0) { d_fprintf(stderr, _("Valid account policies " @@ -560,7 +561,7 @@ static int net_sam_policy_show(struct net_context *c, int argc, const char **arg d_fprintf(stderr, "%s\n", names[i]); } } - SAFE_FREE(names); + TALLOC_FREE(names); return -1; } @@ -592,7 +593,7 @@ static int net_sam_policy_list(struct net_context *c, int argc, const char **arg return 0; } - account_policy_names_list(&names, &count); + account_policy_names_list(talloc_tos(), &names, &count); if (count != 0) { d_fprintf(stderr, _("Valid account policies " "are:\n")); @@ -600,7 +601,7 @@ static int net_sam_policy_list(struct net_context *c, int argc, const char **arg d_fprintf(stderr, "%s\n", names[i]); } } - SAFE_FREE(names); + TALLOC_FREE(names); return -1; } diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 123db0f870..cec65a9db7 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -1142,7 +1142,7 @@ int main (int argc, char **argv) const char **names; int count; int i; - account_policy_names_list(&names, &count); + account_policy_names_list(talloc_tos(), &names, &count); fprintf(stderr, "No account policy by that name!\n"); if (count !=0) { fprintf(stderr, "Account policy names are:\n"); @@ -1150,7 +1150,7 @@ int main (int argc, char **argv) d_fprintf(stderr, "%s\n", names[i]); } } - SAFE_FREE(names); + TALLOC_FREE(names); exit(1); } if (!pdb_get_account_policy(field, &value)) { |