aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2022-02-08 20:01:51 -0500
committerJohn Thacker <johnthacker@gmail.com>2022-02-08 20:03:02 -0500
commit26dafbae392150195dafb2fe868cc55d919c3686 (patch)
treeecdb3cc5cfd66706187f3b9a234291868942e2f2 /file.c
parent782e7db8c0d40207d9ad671347e1e299f5c2e1da (diff)
file: Fix memory leak in Find Packet
If we don't find the data in a packet, reset the wtap record so that the block we just searched is freed before we lose our pointer to it.
Diffstat (limited to 'file.c')
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.c b/file.c
index 02c9c4ae04..5f4df5ea89 100644
--- a/file.c
+++ b/file.c
@@ -3728,6 +3728,7 @@ find_packet(capture_file *cf, ws_match_function match_function,
new_fd = fdata;
break;
}
+ wtap_rec_reset(&rec);
}
if (fdata == start_fd) {