]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Don't leak work queue items in gss-server
authorRobbie Harwood <rharwood@redhat.com>
Tue, 19 Jun 2018 15:32:44 +0000 (11:32 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 26 Jun 2018 15:33:01 +0000 (11:33 -0400)
On accept() failure in gss-server.c, we would leak the freshly
allocated work item.

src/appl/gss-sample/gss-server.c

index c0d0da35b9e67530db450f998f1c756b5a1996b3..6b5959a1c010db2b12bc5b04836e8cd94aeffcac 100644 (file)
@@ -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;
                 }