fix null pointer dereference errors

Change-Id: I82a849afe9f432a1084ad2505ce88b1fe4d3d3af
This commit is contained in:
Jeffrey Altman
2019-01-04 01:02:59 -05:00
parent 735039dbdc
commit 00c590e4ff
5 changed files with 21 additions and 2 deletions

View File

@@ -758,6 +758,16 @@ process_stream(krb5_context contextp,
reply = krb5_storage_emem();
dreply = krb5_storage_emem();
if (msg == NULL || reply == NULL || dreply == NULL) {
if (msg != NULL)
krb5_storage_free(mem);
if (reply != NULL)
krb5_storage_free(reply);
if (dreply != NULL)
krb5_storage_free(dreply);
return krb5_enomem(contextp);
}
/*
* First packet comes partly from the caller
*/