krb5/Fix-leaks-in-gss_inquire_cred_by_oid.patch

36 lines
1.1 KiB
Diff
Raw Normal View History

2017-07-06 17:06:12 +00:00
From e53073b6e1d36b682d8524fcfaec7bdf56b7f81e Mon Sep 17 00:00:00 2001
From: Greg Hudson <ghudson@mit.edu>
Date: Sun, 12 Mar 2017 12:30:59 -0400
Subject: [PATCH] Fix leaks in gss_inquire_cred_by_oid()
In the mechglue gss_inquire_cred_by_oid(), remove an unnecessary
allocation of ret_set which is overwritten by the first mechanism's
result.
ticket: 8559 (new)
target_version: 1.15-next
target_version: 1.14-next
tags: pullup
(cherry picked from commit 0d39d46852587d36fcc5024d5766586faba9044a)
---
src/lib/gssapi/mechglue/g_inq_cred_oid.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/lib/gssapi/mechglue/g_inq_cred_oid.c b/src/lib/gssapi/mechglue/g_inq_cred_oid.c
index 4c23dfcbd..df51b44e9 100644
--- a/src/lib/gssapi/mechglue/g_inq_cred_oid.c
+++ b/src/lib/gssapi/mechglue/g_inq_cred_oid.c
@@ -85,11 +85,6 @@ gss_inquire_cred_by_oid(OM_uint32 *minor_status,
union_cred = (gss_union_cred_t) cred_handle;
- status = gss_create_empty_buffer_set(minor_status, &ret_set);
- if (status != GSS_S_COMPLETE) {
- return status;
- }
-
status = GSS_S_UNAVAILABLE;
for (i = 0; i < union_cred->count; i++) {