From b9b802c4fd52b7f090c090c3179adf69415304af Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Thu, 20 Apr 2006 15:55:20 +0000 Subject: [PATCH] Fix memory leak. closedir() was never being called after successful opendir() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17946 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/support/plugins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c index 424ec70b3..320dd6e83 100644 --- a/src/util/support/plugins.c +++ b/src/util/support/plugins.c @@ -242,6 +242,7 @@ krb5int_open_plugin_dir (const char *dirname, for (i = 0; i < nh; i++) dlclose(h[i].dlhandle); free(h); + closedir(dir); return error; } h = newh; @@ -255,6 +256,7 @@ krb5int_open_plugin_dir (const char *dirname, h = newh; MAKE_NULL_HANDLE (&h[nh]); dirhandle->files = h; + closedir(dir); return 0; /* #elif _WIN32 */ #else -- 2.26.2