From: Ken Raeburn Date: Fri, 14 Jan 2005 04:40:16 +0000 (+0000) Subject: * prof_file.c (profile_open_file): If mutex creation fails, free storage X-Git-Tag: ms-bug-test-20060525~377 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e9e0c8766bc7343b03ffd05abe08362cb6d755a9;p=krb5.git * prof_file.c (profile_open_file): If mutex creation fails, free storage directly instead of calling profile_close_file. ticket: 2878 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17035 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 2247776e6..985664014 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -2,6 +2,8 @@ * prof_file.c (profile_free_file_data): Destroy mutex before freeing containing structure. + (profile_open_file): If mutex creation fails, free storage + directly instead of calling profile_close_file. 2004-12-14 Ken Raeburn diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c index dac4e8a1f..9b0048c9c 100644 --- a/src/util/profile/prof_file.c +++ b/src/util/profile/prof_file.c @@ -272,7 +272,8 @@ errcode_t profile_open_file(const_profile_filespec_t filespec, retval = k5_mutex_init(&data->lock); if (retval) { - profile_close_file(prf); + free(data); + free(prf); return retval; }