[krbdev.mit.edu #8739] Memory leak in function main() in src/tests/threads/profread.c and src/tests/threads/gss-perf.c.
Yang Xiao via RT
rt-comment at KRBDEV-PROD-APP-1.mit.edu
Tue Sep 18 13:06:38 EDT 2018
Hi,
There should be function call for free(tinfo) at the end of the function
main() in profread.c and gss-perf.c. Otherwise, there would be memory
leaks. The patches for main() in profread.c and gss-perf.c are the same
as below.
This is the similar issue as trunk at 23559.
commit ebfd96a98ccb8f7df042cadbeefa00ee4761b9fa
Author: Ezra Peisach <epeisach at mit.edu>
Date:Â Â Thu Dec 31 23:18:16 2009 +0000
   Free tinfo at end - so program runs with new memory leaks
   git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23559
dc483132-0cff-0310-8789-dd5450dbe970
diff --git a/src/tests/threads/init_ctx.c b/src/tests/threads/init_ctx.c
index 208104d..1629060 100644
--- a/src/tests/threads/init_ctx.c
+++ b/src/tests/threads/init_ctx.c
@@ -274,5 +274,6 @@ main (int argc, char *argv[])
            100 * total / wallclock / n_threads);
    printf ("Total CPU use per iteration per thread: %Lfms\n",
            1000 * total / n_threads / iter_count);
+Â Â Â free(tinfo);
    return 0;
 }
Young
More information about the krb5-bugs
mailing list