Adapt to changed signature of _krb5_xunlock, clear more error string
where needed. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15326 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -336,13 +336,14 @@ fkt_start_seq_get_int(krb5_context context,
|
|||||||
ret = krb5_ret_int8(c->sp, &pvno);
|
ret = krb5_ret_int8(c->sp, &pvno);
|
||||||
if(ret) {
|
if(ret) {
|
||||||
krb5_storage_free(c->sp);
|
krb5_storage_free(c->sp);
|
||||||
_krb5_xunlock(c->fd);
|
_krb5_xunlock(context, c->fd);
|
||||||
close(c->fd);
|
close(c->fd);
|
||||||
|
krb5_clear_error_string(context);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if(pvno != 5) {
|
if(pvno != 5) {
|
||||||
krb5_storage_free(c->sp);
|
krb5_storage_free(c->sp);
|
||||||
_krb5_xunlock(c->fd);
|
_krb5_xunlock(context, c->fd);
|
||||||
close(c->fd);
|
close(c->fd);
|
||||||
krb5_clear_error_string (context);
|
krb5_clear_error_string (context);
|
||||||
return KRB5_KEYTAB_BADVNO;
|
return KRB5_KEYTAB_BADVNO;
|
||||||
@@ -350,8 +351,9 @@ fkt_start_seq_get_int(krb5_context context,
|
|||||||
ret = krb5_ret_int8(c->sp, &tag);
|
ret = krb5_ret_int8(c->sp, &tag);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
krb5_storage_free(c->sp);
|
krb5_storage_free(c->sp);
|
||||||
_krb5_xunlock(c->fd);
|
_krb5_xunlock(context, c->fd);
|
||||||
close(c->fd);
|
close(c->fd);
|
||||||
|
krb5_clear_error_string(context);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
id->version = tag;
|
id->version = tag;
|
||||||
@@ -436,7 +438,7 @@ fkt_end_seq_get(krb5_context context,
|
|||||||
krb5_kt_cursor *cursor)
|
krb5_kt_cursor *cursor)
|
||||||
{
|
{
|
||||||
krb5_storage_free(cursor->sp);
|
krb5_storage_free(cursor->sp);
|
||||||
_krb5_xunlock(cursor->fd);
|
_krb5_xunlock(context, cursor->fd);
|
||||||
close(cursor->fd);
|
close(cursor->fd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -590,7 +592,7 @@ fkt_add_entry(krb5_context context,
|
|||||||
krb5_data_free(&keytab);
|
krb5_data_free(&keytab);
|
||||||
out:
|
out:
|
||||||
krb5_storage_free(sp);
|
krb5_storage_free(sp);
|
||||||
_krb5_xunlock(fd);
|
_krb5_xunlock(context, fd);
|
||||||
close(fd);
|
close(fd);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user