From d600e8bedf05d447ba84d9a89be7d46ba34f1b5d Mon Sep 17 00:00:00 2001
From: Thomas Oulevey <thomas.oulevey@cern.ch>
Date: Wed, 23 Sep 2015 10:55:59 +0200
Subject: [PATCH 99/99] Fix memory leak in sssdpac_verify()
Resolves https://fedorahosted.org/sssd/ticket/2803
Reviewed-by: Sumit Bose <sbose@redhat.com>
(cherry picked from commit b4c44ebb8997d3debb33607c123ccfd9926e0cba)
---
src/sss_client/sssd_pac.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/sss_client/sssd_pac.c b/src/sss_client/sssd_pac.c
index 1939f61b18398f62a3e3d6b29cc4fef151b1c3b7..1d98e38826b36aed199b32880a7e27de905a4592 100644
--- a/src/sss_client/sssd_pac.c
+++ b/src/sss_client/sssd_pac.c
@@ -150,6 +150,9 @@ static krb5_error_code sssdpac_verify(krb5_context kcontext,
kerr = krb5_pac_verify(kcontext, pac,
req->ticket->enc_part2->times.authtime,
req->ticket->enc_part2->client, key, NULL);
+ /* deallocate pac */
+ krb5_pac_free(kcontext, pac);
+ pac = NULL;
if (kerr != 0) {
/* The krb5 documentation says:
* A checksum mismatch can occur if the PAC was copied from a
--
2.4.3