krb5 commit: Fix an error case in krb5int_fcc_new_unique

Greg Hudson ghudson at MIT.EDU
Thu Mar 28 02:49:32 EDT 2013


https://github.com/krb5/krb5/commit/2287d34f626a744808c0bd137f504a45d2c1743b
commit 2287d34f626a744808c0bd137f504a45d2c1743b
Author: Greg Hudson <ghudson at mit.edu>
Date:   Thu Mar 28 02:13:00 2013 -0400

    Fix an error case in krb5int_fcc_new_unique
    
    If we fail to allocate setptr, don't close ret, since we've already
    done so.

 src/lib/krb5/ccache/cc_file.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/lib/krb5/ccache/cc_file.c b/src/lib/krb5/ccache/cc_file.c
index 3879db5..d39250f 100644
--- a/src/lib/krb5/ccache/cc_file.c
+++ b/src/lib/krb5/ccache/cc_file.c
@@ -2061,7 +2061,6 @@ krb5int_fcc_new_unique(krb5_context context, char *template, krb5_ccache *id)
         k5_cc_mutex_destroy(&data->lock);
         free(data->filename);
         free(data);
-        (void) close(ret);
         (void) unlink(template);
         return KRB5_CC_NOMEM;
     }


More information about the cvs-krb5 mailing list