summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/smbpasswd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index c0b2cac18a..7957dd8a62 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -398,6 +398,10 @@ static int process_root(int local_flags)
if (remote_machine != NULL) {
old_passwd = get_pass("Old SMB password:",stdin_passwd_get);
+ if(!old_passwd) {
+ fprintf(stderr, "Unable to get old password.\n");
+ exit(1);
+ }
}
if (!(local_flags & LOCAL_SET_PASSWORD)) {
@@ -478,6 +482,7 @@ static int process_root(int local_flags)
}
done:
+ SAFE_FREE(old_passwd);
SAFE_FREE(new_passwd);
return result;
}