aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-queue.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c
index 721f9ac7..58e026f5 100644
--- a/src/afl-fuzz-queue.c
+++ b/src/afl-fuzz-queue.c
@@ -772,13 +772,14 @@ u32 calculate_score(afl_state_t *afl, struct queue_entry *q) {
inline void queue_testcase_release(afl_state_t *afl, struct queue_entry *q) {
(void)afl;
- q->testcase_refs--;
- if (unlikely(q->testcase_refs < 0)) {
+ if (unlikely(q->testcase_refs == 0)) {
- FATAL("Testcase refcount smaller than 0");
+ FATAL("Testcase refcount reduced past 0");
}
+ q->testcase_refs--;
+
}
/* Returns the testcase buf from the file behind this queue entry.