[30240] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Fix minor leak in gssrpc UDP cache code

daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed Jun 20 11:35:06 2018

Date: Wed, 20 Jun 2018 11:35:01 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201806201535.w5KFZ15G006822@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/909c655a9fa38102cfc9864757a33173388146ba
commit 909c655a9fa38102cfc9864757a33173388146ba
Author: Greg Hudson <ghudson@mit.edu>
Date:   Tue Jun 19 13:15:15 2018 -0400

    Fix minor leak in gssrpc UDP cache code
    
    In svc_udp.c:cache_set(), if victim is allocated successfully but
    allocation for newbuf fails, free victim before returning.  Reported
    by Bean Zhang.
    
    ticket: 8703

 src/lib/rpc/svc_udp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/lib/rpc/svc_udp.c b/src/lib/rpc/svc_udp.c
index d3140df..8ecbdf2 100644
--- a/src/lib/rpc/svc_udp.c
+++ b/src/lib/rpc/svc_udp.c
@@ -479,6 +479,7 @@ cache_set(
 		newbuf = mem_alloc(su->su_iosz);
 		if (newbuf == NULL) {
 			CACHE_PERROR("cache_set: could not allocate new rpc_buffer");
+			free(victim);
 			return;
 		}
 	}
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post