Skip to content

Commit

Permalink
fuzz: rightly uses PacketFreeOrRelease in target
Browse files Browse the repository at this point in the history
instead of PacketFree because packets
may belong to the pool
  • Loading branch information
catenacyber committed Jan 27, 2021
1 parent e586d85 commit 62e665c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tests/fuzz/fuzz_sigpcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
}
Packet *extra_p = PacketDequeueNoLock(&tv.decode_pq);
while (extra_p != NULL) {
PacketFree(extra_p);
PacketFreeOrRelease(extra_p);
extra_p = PacketDequeueNoLock(&tv.decode_pq);
}
tmm_modules[TMM_FLOWWORKER].Func(&tv, p, fwd);
extra_p = PacketDequeueNoLock(&tv.decode_pq);
while (extra_p != NULL) {
PacketFree(extra_p);
PacketFreeOrRelease(extra_p);
extra_p = PacketDequeueNoLock(&tv.decode_pq);
}
}
Expand Down

0 comments on commit 62e665c

Please sign in to comment.