[PATCH 1/3] cifs.upcall: fix memory and call krb5_auth_con_free()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



metze
---
 cifs.upcall.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/cifs.upcall.c b/cifs.upcall.c
index 9b1436e..9116e56 100644
--- a/cifs.upcall.c
+++ b/cifs.upcall.c
@@ -313,13 +313,15 @@ cifs_krb5_get_req(const char *principal, const char *ccname,
 	if (ret) {
 		syslog(LOG_DEBUG, "%s: unable to get session key for %s",
 		       __func__, principal);
-		goto out_free_creds;
+		goto out_free_auth;
 	}
 
 	*mechtoken = data_blob(apreq_pkt.data, apreq_pkt.length);
 	*sess_key = data_blob(KRB5_KEY_DATA(tokb), KRB5_KEY_LENGTH(tokb));
 
 	krb5_free_keyblock(context, tokb);
+out_free_auth:
+	krb5_auth_con_free(context, auth_context);
 out_free_creds:
 	krb5_free_creds(context, out_creds);
 out_free_principal:
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux