summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-08 01:23:54 +0200
committerGünther Deschner <gd@samba.org>2009-05-08 01:24:28 +0200
commitd7b32b51f840d34e0ecb62dd8b7df862974d6271 (patch)
tree21e97d6ec9dac5cf68e816d9e07ed6041436aa2e
parentc469ec5c10b48548e1fae51511bd55fb437a0a89 (diff)
downloadsamba-d7b32b51f840d34e0ecb62dd8b7df862974d6271.tar.gz
samba-d7b32b51f840d34e0ecb62dd8b7df862974d6271.tar.bz2
samba-d7b32b51f840d34e0ecb62dd8b7df862974d6271.zip
s3-samr: Fix potential memory leak in _samr_ChangePasswordUser().
Guenther
-rw-r--r--source3/rpc_server/srv_samr_nt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 862917b418..389a6d532f 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -1813,7 +1813,8 @@ NTSTATUS _samr_ChangePasswordUser(pipes_struct *p,
nt_pass = pdb_get_nt_passwd(pwd);
if (!lm_pass || !nt_pass) {
- return NT_STATUS_WRONG_PASSWORD;
+ status = NT_STATUS_WRONG_PASSWORD;
+ goto out;
}
memcpy(&lm_pwd.hash, lm_pass, sizeof(lm_pwd.hash));