Fix memory leak in profile_init_path()
authorDanilo Almeida <dalmeida@mit.edu>
Thu, 17 Jun 1999 09:57:23 +0000 (09:57 +0000)
committerDanilo Almeida <dalmeida@mit.edu>
Thu, 17 Jun 1999 09:57:23 +0000 (09:57 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11517 dc483132-0cff-0310-8789-dd5450dbe970

src/util/profile/ChangeLog
src/util/profile/prof_init.c

index 02dd1c8cef56de9ee6b32233200cb3a412e2ce48..d379501d001efa27d2ff3c85a95bb3c7dfb11dbd 100644 (file)
@@ -1,3 +1,7 @@
+1999-06-16  Danilo Almeida  <dalmeida@mit.edu>
+
+       * prof_init.c (profile_init_path): Fix memory leak.
+
 1999-06-09 Miro Jurisic   <meeroh@mit.edu>
 
        * prof_file.c (profile_update_file): if fopen fails and errno is 0, set
index 1411e4f4549028338d212924413416a5e5b92a47..ab38a6d2e72d559e082b866d5b8a837054689739 100644 (file)
@@ -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);