From: Greg Hudson Date: Thu, 12 Feb 2009 19:38:08 +0000 (+0000) Subject: In krb5_rc_io_open_internal, d->fn is always set for the cleanup X-Git-Tag: krb5-1.8-alpha1~640 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=435b9a5e3cca3afa2fb8849c87c7e0f775f62282;p=krb5.git In krb5_rc_io_open_internal, d->fn is always set for the cleanup handler, so do not check it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21982 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/rcache/rc_io.c b/src/lib/krb5/rcache/rc_io.c index 02a45a455..8d7d986da 100644 --- a/src/lib/krb5/rcache/rc_io.c +++ b/src/lib/krb5/rcache/rc_io.c @@ -295,12 +295,10 @@ krb5_rc_io_open_internal(krb5_context context, krb5_rc_iostuff *d, char *fn, cleanup: if (retval) { - if (d->fn) { - if (!do_not_unlink) - (void) unlink(d->fn); - free(d->fn); - d->fn = NULL; - } + if (!do_not_unlink) + (void) unlink(d->fn); + free(d->fn); + d->fn = NULL; if (d->fd >= 0) (void) close(d->fd); }