aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/controller
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-01-28 11:38:19 +0100
committerAleksandr Nogikh <nogikh@google.com>2025-01-28 13:08:22 +0000
commit865ef71e5889541e7310ee9b3da3a945f354da8b (patch)
treea72d216f184da8b961ee052ef3ae1c0f3bb27718 /syz-cluster/controller
parentf5427d7cf8bff4a8e0647b95351bea3d20e0654e (diff)
syz-cluster/controller: handle a channel closure
If we don't consider the possibility, we risk processing a nil value and causing a nil pointer dereference.
Diffstat (limited to 'syz-cluster/controller')
-rw-r--r--syz-cluster/controller/processor.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/syz-cluster/controller/processor.go b/syz-cluster/controller/processor.go
index 6a36a7551..1493b5852 100644
--- a/syz-cluster/controller/processor.go
+++ b/syz-cluster/controller/processor.go
@@ -120,6 +120,9 @@ func (sp *SeriesProcessor) seriesRunner(ctx context.Context, ch <-chan *db.Sessi
var session *db.Session
select {
case session = <-ch:
+ if session == nil {
+ return
+ }
case <-ctx.Done():
return
}