From 4ffd70b133afea3d19fccbac269798c1d210c0fd Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 19 Apr 2011 16:37:19 +0000 Subject: [PATCH] Fix memory leak in kpasswd server UDP error path The dispatch() in kadmind's schpw.c could return a failure code with an allocated response container. net-server.c does not expect this and leaks the container in the UDP case. Free the container in dispatch() if we are returning an error. ticket: 6903 target_version: 1.9.1 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24886 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/server/schpw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kadmin/server/schpw.c b/src/kadmin/server/schpw.c index ca0710754..f8c235c45 100644 --- a/src/kadmin/server/schpw.c +++ b/src/kadmin/server/schpw.c @@ -535,6 +535,10 @@ dispatch(void *handle, remote_faddr, request, *response); + if (ret) { + krb5_free_data(server_handle->context, *response); + *response = NULL; + } cleanup: if (local_kaddrs != NULL) -- 2.26.2