1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

Fix coverity #900. Resource leak.

Jeremy.
This commit is contained in:
Jeremy Allison 2009-06-19 16:44:15 -07:00
parent f262f80a1c
commit d9eb1d9764

View File

@ -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;
}