krb5: _krb5_expand_path_tokens missing va_end()

when returning early due to memory allocation error must call va_end()

Change-Id: Icc42771c166453f67679334cea19ed9be692bd87
This commit is contained in:
Jeffrey Altman
2016-11-18 21:12:36 -05:00
parent 97a40d8838
commit 5cf454ca54

View File

@@ -498,6 +498,7 @@ _krb5_expand_path_tokensv(krb5_context context,
break;
extra_tokens[i] = strdup(s);
if (extra_tokens[i++] == NULL) {
va_end(ap);
free_extra_tokens(extra_tokens);
return krb5_enomem(context);
}
@@ -506,6 +507,7 @@ _krb5_expand_path_tokensv(krb5_context context,
s = "";
extra_tokens[i] = strdup(s);
if (extra_tokens[i] == NULL) {
va_end(ap);
free_extra_tokens(extra_tokens);
return krb5_enomem(context);
}