dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0099-Fix-memory-leak-in-sssdpac_verify.patch

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