diff options
author | Volker Lendecke <vl@sernet.de> | 2007-11-23 12:04:35 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-11-23 13:04:50 -0800 |
commit | 49949f0b85007c7c2b3c340c12f3d18909862135 (patch) | |
tree | 763657758dc5a39e21bd2799a776c5f796fb5ffd /source/utils/smbpasswd.c | |
parent | 9751cc222c70fd669a1cc1ad61ffb4e2e8444019 (diff) | |
download | samba-49949f0b85007c7c2b3c340c12f3d18909862135.tar.gz samba-49949f0b85007c7c2b3c340c12f3d18909862135.tar.xz samba-49949f0b85007c7c2b3c340c12f3d18909862135.zip |
Make remote_password_change return malloced error strings
This fixes a segfault in smbpasswd -r
Diffstat (limited to 'source/utils/smbpasswd.c')
-rw-r--r-- | source/utils/smbpasswd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index b7fc65525ac..2154f5d15fb 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -243,9 +243,10 @@ static NTSTATUS password_change(const char *remote_mach, char *username, return NT_STATUS_UNSUCCESSFUL; } ret = remote_password_change(remote_mach, username, - old_passwd, new_pw, err_str, sizeof(err_str)); - if(*err_str) + old_passwd, new_pw, &err_str); + if (err_str != NULL) fprintf(stderr, "%s", err_str); + SAFE_FREE(err_str); return ret; } |