Skip to content

Commit 33465ab

Browse files
fix(cleanup): panic: runtime error: invalid memory address or nil pointer dereference (#5937)
``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x31c9217] goroutine 1 [running]: github.com/werf/werf/pkg/cleaning/stage_manager.(*Manager).InitFinalStages(0xc0011ce5a0, {0x4a176a8?, 0xc0012be360?}, {0x4a48428?, 0xc000cca0b0?}) /git/pkg/cleaning/stage_manager/manager.go:88 +0x97 github.com/werf/werf/pkg/cleaning.(*cleanupManager).init.func2() /git/pkg/cleaning/cleanup.go:90 +0x2d github.com/werf/logboek/internal/stream.(*LogProcess).DoError(0xc000da3d80, 0xc00002d3e0) /go/pkg/mod/github.com/werf/logboek@v0.6.1/internal/stream/process_types.go:195 +0xd5 github.com/werf/werf/pkg/cleaning.(*cleanupManager).init(0xc0011ce5a0, {0x4a176a8?, 0xc0012be360}) /git/pkg/cleaning/cleanup.go:89 +0x1c6 ``` Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
1 parent f67fbc4 commit 33465ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/storage/manager/storage_manager.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ func (m *StorageManager) GetFinalStageDescriptionList(ctx context.Context) ([]*i
311311

312312
if stageDesc == nil {
313313
logboek.Context(ctx).Warn().LogF("Ignoring stage %s: cannot get stage description from %s\n", stageID.String(), m.FinalStagesStorage.String())
314+
return nil
314315
}
315316

316317
mutex.Lock()

0 commit comments

Comments
 (0)