aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-03-01 11:33:21 -0500
committerMichael Mann <mmann78@netscape.net>2016-03-01 19:11:37 +0000
commit9063aca61592d7d7b0e56eb79877dc9ddac39359 (patch)
tree0d811756042030960dfa6e1a75306d800de58762 /wiretap
parent9f27e5d7d19027ddf8f29c5a6a321912e7c2f9dd (diff)
NULL check GArray to prevent assertion.
Change-Id: I52de10a1d96b6ef7294ad8be9ec9195defca4b53 Reviewed-on: https://code.wireshark.org/review/14266 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/wtap_opttypes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wiretap/wtap_opttypes.c b/wiretap/wtap_opttypes.c
index 8a61297e26..e287ea1b92 100644
--- a/wiretap/wtap_opttypes.c
+++ b/wiretap/wtap_opttypes.c
@@ -169,7 +169,8 @@ void wtap_optionblock_free(wtap_optionblock_t block)
wtap_optionblock_free(if_stats);
}
- g_array_free(mand->interface_statistics, TRUE);
+ if (mand->interface_statistics)
+ g_array_free(mand->interface_statistics, TRUE);
}
g_free(block->mandatory_data);