[28562] in CVS-changelog-for-Kerberos-V5
krb5 commit: Fix unlikely memory leak in KCM client
daemon@ATHENA.MIT.EDU (Greg Hudson)
Tue Sep 2 17:49:04 2014
Date: Tue, 2 Sep 2014 17:48:59 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201409022148.s82LmxkO021055@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/935de68b110ca0369e4cf16bbdc7da74b5799e69
commit 935de68b110ca0369e4cf16bbdc7da74b5799e69
Author: Greg Hudson <ghudson@mit.edu>
Date: Tue Sep 2 14:02:26 2014 -0400
Fix unlikely memory leak in KCM client
Commit 956cbd24e645609c94fbc836840ce0f87ba3ce79 created a memory leak
if the KCM_OP_GET_DEFAULT_CACHE call fails inside kcm_ptcursor_new
after the KCM_OP_GET_CACHE_UUID_LIST call succeeds. Fix it.
ticket: 8002
src/lib/krb5/ccache/cc_kcm.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/lib/krb5/ccache/cc_kcm.c b/src/lib/krb5/ccache/cc_kcm.c
index 926a99c..1e404ee 100644
--- a/src/lib/krb5/ccache/cc_kcm.c
+++ b/src/lib/krb5/ccache/cc_kcm.c
@@ -869,7 +869,7 @@ kcm_ptcursor_new(krb5_context context, krb5_cc_ptcursor *cursor_out)
krb5_error_code ret;
struct kcmreq req = EMPTY_KCMREQ;
struct kcmio *io = NULL;
- struct uuid_list *uuids;
+ struct uuid_list *uuids = NULL;
const char *defname, *primary;
*cursor_out = NULL;
@@ -911,9 +911,11 @@ kcm_ptcursor_new(krb5_context context, krb5_cc_ptcursor *cursor_out)
goto cleanup;
ret = make_ptcursor(primary, uuids, io, cursor_out);
+ uuids = NULL;
io = NULL;
cleanup:
+ free_uuid_list(uuids);
kcmio_close(io);
kcmreq_free(&req);
return ret;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5