aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2015-11-18 08:15:39 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2015-11-18 07:18:18 +0000
commit8c211d51ef66b64c708f7ad079e7e7e913ac9f14 (patch)
treec190254be88555bece0351b69ebdc178b08faa53 /file.c
parent2cbb58366eb8f6cc373c30dd919f988700a515bf (diff)
epan: Check for valid cf->edt before free.
Added a check for a valid cf->edt before calling epan_dissect_free(), as this will give an unintended assert. This is related to da71ccbf778cca5d9c48e010597570a40fd190c0. Change-Id: I7f7ceb1b25cfa2400063947f674df10ed6a93e9d Reviewed-on: https://code.wireshark.org/review/11934 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/file.c b/file.c
index 03617091e8..0b546c91f7 100644
--- a/file.c
+++ b/file.c
@@ -1623,8 +1623,10 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item, gb
cf->redissecting = TRUE;
/* 'reset' dissection session */
- epan_dissect_free(cf->edt);
- cf->edt = NULL;
+ if (cf->edt) {
+ epan_dissect_free(cf->edt);
+ cf->edt = NULL;
+ }
epan_free(cf->epan);
cf->epan = ws_epan_new(cf);
cf->cinfo.epan = cf->epan;