aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/krb5/krb/preauth2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c
index ffca476..32f35b7 100644
--- a/src/lib/krb5/krb/preauth2.c
+++ b/src/lib/krb5/krb/preauth2.c
@@ -263,6 +263,10 @@ k5_preauth_request_context_init(krb5_context context,
* preauth context's array of handles. */
for (count = 0; pctx->handles[count] != NULL; count++);
reqctx->modreqs = calloc(count, sizeof(*reqctx->modreqs));
+ if (reqctx->modreqs == NULL) {
+ free(reqctx);
+ return;
+ }
for (i = 0; i < count; i++) {
h = pctx->handles[i];
if (h->vt.request_init != NULL)