diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/ntlm_auth.c | 2 | ||||
-rw-r--r-- | source3/utils/smbpasswd.c | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 0b50ced0b9..18db15dfce 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -2180,6 +2180,7 @@ enum { int main(int argc, const char **argv) { + TALLOC_CTX *frame = talloc_stackframe(); int opt; static const char *helper_protocol; static int diagnostics; @@ -2361,5 +2362,6 @@ enum { /* Exit code */ poptFreeContext(pc); + TALLOC_FREE(frame); return 0; } diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 296c0630d8..b7fc65525a 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -233,8 +233,8 @@ static NTSTATUS password_change(const char *remote_mach, char *username, int local_flags) { NTSTATUS ret; - pstring err_str; - pstring msg_str; + char *err_str = NULL; + char *msg_str = NULL; if (remote_mach != NULL) { if (local_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER| @@ -250,13 +250,15 @@ static NTSTATUS password_change(const char *remote_mach, char *username, } ret = local_password_change(username, local_flags, new_pw, - err_str, sizeof(err_str), msg_str, sizeof(msg_str)); + &err_str, &msg_str); - if(*msg_str) + if(msg_str) printf("%s", msg_str); - if(*err_str) + if(err_str) fprintf(stderr, "%s", err_str); + SAFE_FREE(msg_str); + SAFE_FREE(err_str); return ret; } |