To: | krb5-bugs@mit.edu |
From: | Yang Xiao <xiaoyang@iie.ac.cn> |
Subject: | Memory leak in function main() in src/tests/threads/profread.c and src/tests/threads/gss-perf.c. |
Date: | Tue, 18 Sep 2018 15:13:42 +0800 |
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 ebfd96a98ccb8f7df042cadbeefa00ee4761b9faAuthor: Ezra Peisach <epeisach@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