From 4f95a4992e342cff3116f25a0d4fea054be4dbb0 Mon Sep 17 00:00:00 2001 From: Danilo Almeida Date: Thu, 17 Jun 1999 09:57:23 +0000 Subject: [PATCH] Fix memory leak in profile_init_path() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11517 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/profile/ChangeLog | 4 ++++ src/util/profile/prof_init.c | 1 + 2 files changed, 5 insertions(+) diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 02dd1c8ce..d379501d0 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,7 @@ +1999-06-16 Danilo Almeida + + * prof_init.c (profile_init_path): Fix memory leak. + 1999-06-09 Miro Jurisic * prof_file.c (profile_update_file): if fopen fails and errno is 0, set diff --git a/src/util/profile/prof_init.c b/src/util/profile/prof_init.c index 1411e4f45..ab38a6d2e 100644 --- a/src/util/profile/prof_init.c +++ b/src/util/profile/prof_init.c @@ -98,6 +98,7 @@ profile_init_path(filepath, ret_profile) if (filenames[i] == 0) { /* if malloc fails, free the ones that worked */ while(--i >= 0) free(filenames[i]); + free(filenames); return ENOMEM; } strncpy(filenames[i], s, ent_len); -- 2.26.2