From 97c5f7b84c9ddf1965534bc4bc6422b0797b2906 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Tue, 25 Jun 2024 09:34:00 -0500 Subject: [PATCH] fix: return potential error created by defer --- fuzzing/fuzzer_worker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fuzzing/fuzzer_worker.go b/fuzzing/fuzzer_worker.go index 08bd5f6b..4bf848c0 100644 --- a/fuzzing/fuzzer_worker.go +++ b/fuzzing/fuzzer_worker.go @@ -311,7 +311,7 @@ func (fw *FuzzerWorker) testNextCallSequence() (calls.CallSequence, []ShrinkCall // If our fuzzer context is done, exit out immediately without results. if utils.CheckContextDone(fw.fuzzer.ctx) { - return nil, nil, nil + return nil, nil, err } // If this was not a new call sequence, indicate not to save the shrunken result to the corpus again. @@ -322,7 +322,7 @@ func (fw *FuzzerWorker) testNextCallSequence() (calls.CallSequence, []ShrinkCall } // Return our results accordingly. - return testedCallSequence, shrinkCallSequenceRequests, nil + return testedCallSequence, shrinkCallSequenceRequests, err } // testShrunkenCallSequence tests a provided shrunken call sequence to verify it continues to satisfy the provided