From d865c33103555730f699fcdceed81a29bc455124 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Sun, 5 Apr 1998 23:57:09 +0000 Subject: [PATCH] * g_cnffile.c (krb__get_srvtabname): Fix up to not free context unless it is valid. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10514 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/ChangeLog | 5 +++++ src/lib/krb4/g_cnffile.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 2dc4d2aab..c3748755d 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,8 @@ +Sun Apr 5 19:51:21 1998 Tom Yu + + * g_cnffile.c (krb__get_srvtabname): Fix up to not free context + unless it is valid. + Wed Feb 18 16:17:49 1998 Tom Yu * Makefile.in: Remove trailing slash from thisconfigdir. Fix up diff --git a/src/lib/krb4/g_cnffile.c b/src/lib/krb4/g_cnffile.c index 12edf2874..569789f89 100644 --- a/src/lib/krb4/g_cnffile.c +++ b/src/lib/krb4/g_cnffile.c @@ -70,7 +70,8 @@ krb__get_srvtabname(default_srvtabname) }else { retname = strdup(default_srvtabname); } - krb5_free_context(context); + if (context != NULL) + krb5_free_context(context); return retname; } -- 2.26.2