From: Danilo Almeida Date: Wed, 23 Jun 1999 22:18:05 +0000 (+0000) Subject: Check whether profile is valid before partying on it X-Git-Tag: krb5-1.1-beta1~91 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6552c09a1b8b194f3ece2d27f3d28fc9b0a9acb0;p=krb5.git Check whether profile is valid before partying on it git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11527 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 1d5748853..719243cd4 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,8 @@ +1999-06-23 Danilo Almeida + + * prof_init.c (profile_abandon, profile_release): Check whether + profile is valid before partying on it. + 1999-06-18 Ken Raeburn * prof_tree.c (profile_node_iterator): Remove semicolon after diff --git a/src/util/profile/prof_init.c b/src/util/profile/prof_init.c index ab38a6d2e..e525a37eb 100644 --- a/src/util/profile/prof_init.c +++ b/src/util/profile/prof_init.c @@ -139,6 +139,9 @@ profile_abandon(profile) { prf_file_t p, next; + if (!profile || profile->magic != PROF_MAGIC_PROFILE) + return; + for (p = profile->first_file; p; p = next) { next = p->next; profile_free_file(p); @@ -153,6 +156,9 @@ profile_release(profile) { prf_file_t p, next; + if (!profile || profile->magic != PROF_MAGIC_PROFILE) + return; + for (p = profile->first_file; p; p = next) { next = p->next; profile_close_file(p);