krb5 commit: Don't leak work queue items in gss-server
Greg Hudson
ghudson at mit.edu
Tue Jun 26 12:14:24 EDT 2018
https://github.com/krb5/krb5/commit/db479eb8d76e04ad3227263dd01e80d300c3fd9f
commit db479eb8d76e04ad3227263dd01e80d300c3fd9f
Author: Robbie Harwood <rharwood at redhat.com>
Date: Tue Jun 19 11:32:44 2018 -0400
Don't leak work queue items in gss-server
On accept() failure in gss-server.c, we would leak the freshly
allocated work item.
src/appl/gss-sample/gss-server.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/appl/gss-sample/gss-server.c b/src/appl/gss-sample/gss-server.c
index c0d0da3..6b5959a 100644
--- a/src/appl/gss-sample/gss-server.c
+++ b/src/appl/gss-sample/gss-server.c
@@ -781,6 +781,7 @@ main(int argc, char **argv)
/* Accept a TCP connection */
if ((work->s = accept(stmp, NULL, 0)) < 0) {
perror("accepting connection");
+ free(work);
continue;
}
More information about the cvs-krb5
mailing list