Skip to content

Commit

Permalink
Fix nil pointer deref panic on helm_release destroy (#1501)
Browse files Browse the repository at this point in the history
The destroy panics when helm returns "release not found" as the returned
response is nil.
  • Loading branch information
sbocinec authored Oct 15, 2024
1 parent d2ba417 commit 48730a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/1501.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
`helm_release`: Fix nil pointer deref panic on destroy when helm release is not found
```
2 changes: 1 addition & 1 deletion helm/resource_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ func resourceReleaseDelete(ctx context.Context, d *schema.ResourceData, meta int
return diag.FromErr(err)
}

if res.Info != "" {
if res != nil && res.Info != "" {
return diag.Diagnostics{
{
Severity: diag.Warning,
Expand Down

0 comments on commit 48730a7

Please sign in to comment.