]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix an error case in krb5int_fcc_new_unique
authorGreg Hudson <ghudson@mit.edu>
Thu, 28 Mar 2013 06:13:00 +0000 (02:13 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 28 Mar 2013 06:13:00 +0000 (02:13 -0400)
If we fail to allocate setptr, don't close ret, since we've already
done so.

src/lib/krb5/ccache/cc_file.c

index 3879db5566f03b417adb29f4e2e89d740e60e3fd..d39250f89f1bc07549b89ec9912298469ec9c8e6 100644 (file)
@@ -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;
     }