free some more memory. check some more return values.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4021 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-11-16 09:49:56 +00:00
parent d294202b45
commit f93ce02560
3 changed files with 17 additions and 6 deletions

View File

@@ -79,6 +79,8 @@ krb5_mk_rep(krb5_context context,
free (ap.enc_part.cipher.data);
outbuf->length = len;
outbuf->data = malloc(len);
if (outbuf->data == NULL)
return ENOMEM;
memcpy(outbuf->data, buf + sizeof(buf) - len, len);
return 0;
}