[krbdev.mit.edu #8739] Memory leak in function main() in src/tests/threads/profread.c and src/tests/threads/gss-perf.c.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[krbdev.mit.edu #8739] Memory leak in function main() in src/tests/threads/profread.c and src/tests/threads/gss-perf.c.

Greg Hudson via RT-2
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@23559.

commit ebfd96a98ccb8f7df042cadbeefa00ee4761b9fa
Author: Ezra Peisach <[hidden email]>
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



_______________________________________________
krb5-bugs mailing list
[hidden email]
https://mailman.mit.edu/mailman/listinfo/krb5-bugs