diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-14 13:40:02 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-14 13:53:29 +1100 |
commit | 6582d4739c25a879c58fc768290b3f97ecf795c7 (patch) | |
tree | 71891d1271ead168aef86beb53115be9fc5ef4f4 /source4 | |
parent | f198c901dd8d364cef7f889bac9332b14261d864 (diff) | |
download | samba-6582d4739c25a879c58fc768290b3f97ecf795c7.tar.gz samba-6582d4739c25a879c58fc768290b3f97ecf795c7.tar.bz2 samba-6582d4739c25a879c58fc768290b3f97ecf795c7.zip |
s4-auth: fixed crash in krb5 auth
remote_addr was used after free
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/kerberos/krb5_init_context.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c index 6727de0f99..ebe19e6b25 100644 --- a/source4/auth/kerberos/krb5_init_context.c +++ b/source4/auth/kerberos/krb5_init_context.c @@ -207,7 +207,6 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context context, { krb5_error_code ret; NTSTATUS status; - struct socket_address *remote_addr; const char *name; struct addrinfo *ai, *a; struct smb_krb5_socket *smb_krb5; @@ -240,6 +239,7 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context context, } for (a = ai; a; a = ai->ai_next) { + struct socket_address *remote_addr; smb_krb5 = talloc(tmp_ctx, struct smb_krb5_socket); if (!smb_krb5) { talloc_free(tmp_ctx); @@ -291,7 +291,6 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context context, talloc_free(smb_krb5); continue; } - talloc_free(remote_addr); /* Setup the FDE, start listening for read events * from the start (otherwise we may miss a socket |