From: Greg Hudson Date: Thu, 23 Jun 2011 19:50:04 +0000 (+0000) Subject: Don't destroy dst on error in krb5_cc_move X-Git-Tag: krb5-1.10-alpha1~385 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8870237ed89dcfa15f84cc78e85ed406729b0a3;p=krb5.git Don't destroy dst on error in krb5_cc_move Although destroying any partial contents of dst on error isn't a bad idea, invalidating the handle would be an incompatible change. So revert that part of r24754. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24988 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index 267c0c074..39300871a 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -2142,7 +2142,7 @@ krb5_cc_get_type(krb5_context context, krb5_ccache cache); * @retval * 0 Success; @a src is closed. * @return - * Kerberos error codes; @a src is still allocated, while @a dst is closed. + * Kerberos error codes; @a src is still allocated. */ krb5_error_code KRB5_CALLCONV krb5_cc_move(krb5_context context, krb5_ccache src, krb5_ccache dst); diff --git a/src/lib/krb5/ccache/ccbase.c b/src/lib/krb5/ccache/ccbase.c index 69bb8b876..bd54695c8 100644 --- a/src/lib/krb5/ccache/ccbase.c +++ b/src/lib/krb5/ccache/ccbase.c @@ -401,8 +401,6 @@ krb5_cc_move(krb5_context context, krb5_ccache src, krb5_ccache dst) krb5_cc_unlock(context, src); if (!ret) { ret = krb5_cc_destroy(context, src); - } else { - ret = krb5_cc_destroy(context, dst); } krb5_cccol_unlock(context); if (princ) {