aboutsummaryrefslogtreecommitdiffstats
path: root/rawshark.c
diff options
context:
space:
mode:
Diffstat (limited to 'rawshark.c')
-rw-r--r--rawshark.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rawshark.c b/rawshark.c
index 8d29f34574..b1e484544b 100644
--- a/rawshark.c
+++ b/rawshark.c
@@ -990,7 +990,7 @@ load_cap_file(capture_file *cf)
struct wtap_pkthdr phdr;
epan_dissect_t edt;
- memset(&phdr, 0, sizeof(phdr));
+ wtap_phdr_init(&phdr);
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
@@ -1000,6 +1000,8 @@ load_cap_file(capture_file *cf)
epan_dissect_cleanup(&edt);
+ wtap_phdr_cleanup(&phdr);
+
if (err != 0) {
/* Print a message noting that the read failed somewhere along the line. */
switch (err) {