diff --git a/lib/krb5/config_file.c b/lib/krb5/config_file.c index 736fd5a2c..45266dcdd 100644 --- a/lib/krb5/config_file.c +++ b/lib/krb5/config_file.c @@ -574,7 +574,7 @@ krb5_config_vget_strings(krb5_context context, } if(nstr){ char **tmp = realloc(strings, (nstr + 1) * sizeof(*strings)); - if(strings == NULL) + if(tmp == NULL) goto cleanup; strings = tmp; strings[nstr] = NULL;