diff --git a/source/credentials_provider_sts_web_identity.c b/source/credentials_provider_sts_web_identity.c index 5aaafe78..f42244b8 100644 --- a/source/credentials_provider_sts_web_identity.c +++ b/source/credentials_provider_sts_web_identity.c @@ -924,6 +924,7 @@ static void s_check_or_get_with_profile_config( if ((!(*target) || !(*target)->len)) { if (*target) { aws_string_destroy(*target); + *target = NULL; } const struct aws_profile_property *property = aws_profile_get_property(profile, config_key); if (property) {