From: Ken Raeburn Date: Tue, 26 Oct 1999 23:57:20 +0000 (+0000) Subject: * k5seal.c (make_integ_token_v2): Set 'code' when malloc fails X-Git-Tag: krb5-1.2-beta1~200 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c2c1434844a5a3654dbaaf75fb9a199469c59991;p=krb5.git * k5seal.c (make_integ_token_v2): Set 'code' when malloc fails git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11882 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 52d1382a0..23999be02 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,7 @@ +1999-10-26 Ken Raeburn + + * k5seal.c (make_integ_token_v2): Set 'code' when malloc fails. + 1999-10-26 Tom Yu * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES, diff --git a/src/lib/gssapi/krb5/k5seal.c b/src/lib/gssapi/krb5/k5seal.c index e1877b71f..ae8cc7590 100644 --- a/src/lib/gssapi/krb5/k5seal.c +++ b/src/lib/gssapi/krb5/k5seal.c @@ -179,8 +179,10 @@ make_integ_token_v2(context, subkey, ctype, seqnum, direction, text, token, plain.length = 7+text->length; - if ((plain.data = (char *) malloc(plain.length)) == NULL) + if ((plain.data = (char *) malloc(plain.length)) == NULL) { + code = errno; goto cleanup; + } plain.data[0] = (*seqnum >> 24) & 0xff; plain.data[1] = (*seqnum >> 16) & 0xff;