diff options
author | Jeremy Allison <jra@samba.org> | 2004-01-07 19:55:01 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2004-01-07 19:55:01 +0000 |
commit | e41a67a18839ea8a5e1bd5403f3668e7f2b374b7 (patch) | |
tree | 89094971c5152c8ee401584a9eaf7eaafa679cf8 /source3 | |
parent | 43a4e1dbf99902e641aca02329f855685f8b01ec (diff) | |
download | samba-e41a67a18839ea8a5e1bd5403f3668e7f2b374b7.tar.gz samba-e41a67a18839ea8a5e1bd5403f3668e7f2b374b7.tar.bz2 samba-e41a67a18839ea8a5e1bd5403f3668e7f2b374b7.zip |
Fix from Luke Howard <lukeh@PADL.COM> for incorrect early free().
Jeremy.
(This used to be commit 8e20c06ed31d9ec10ff0155b1624eee3d60cd006)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/sesssetup.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 2c38cd3eb3..80be9da53b 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -241,11 +241,10 @@ static int reply_spnego_kerberos(connection_struct *conn, pw = smb_getpwnam( user ); - SAFE_FREE(user); - SAFE_FREE(client); - if (!pw) { DEBUG(1,("Username %s is invalid on this system\n",user)); + SAFE_FREE(user); + SAFE_FREE(client); data_blob_free(&ap_rep); return ERROR_NT(NT_STATUS_LOGON_FAILURE); } @@ -257,14 +256,17 @@ static int reply_spnego_kerberos(connection_struct *conn, if (!NT_STATUS_IS_OK(ret = make_server_info_pw(&server_info,pw))) { DEBUG(1,("make_server_info_from_pw failed!\n")); + SAFE_FREE(user); + SAFE_FREE(client); data_blob_free(&ap_rep); return ERROR_NT(ret); } /* register_vuid keeps the server info */ - sess_vuid = register_vuid(server_info, session_key, nullblob, user); + sess_vuid = register_vuid(server_info, session_key, nullblob, client); - free(user); + SAFE_FREE(user); + SAFE_FREE(client); if (sess_vuid == -1) { ret = NT_STATUS_LOGON_FAILURE; |