(_kdc_do_524): Handle memory allocation failure

Coverity, NetBSD CID#2752


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17015 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-07 22:12:28 +00:00
parent 2a6831b56c
commit 8f297fdb5c

View File

@@ -374,6 +374,7 @@ _kdc_do_524(krb5_context context,
/* make reply */
memset(buf, 0, sizeof(buf));
sp = krb5_storage_from_mem(buf, sizeof(buf));
if (sp) {
krb5_store_int32(sp, ret);
if(ret == 0){
krb5_store_int32(sp, kvno);
@@ -386,7 +387,8 @@ _kdc_do_524(krb5_context context,
ret = krb5_storage_to_data(sp, reply);
reply->length = krb5_storage_seek(sp, 0, SEEK_CUR);
krb5_storage_free(sp);
} else
krb5_data_zero(reply);
if(spn)
free(spn);
if(server)