aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bootp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-bootp.c')
-rw-r--r--epan/dissectors/packet-bootp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c
index 500c12f5e5..6c590a6a6e 100644
--- a/epan/dissectors/packet-bootp.c
+++ b/epan/dissectors/packet-bootp.c
@@ -6340,10 +6340,13 @@ bootp_clear_uat_bootpopt(gpointer data, gpointer user_data _U_)
static void
bootp_cleanup_protocol(void)
{
- wmem_list_foreach(saved_uat_opts, bootp_clear_uat_bootpopt, NULL);
+ if (saved_uat_opts != NULL) {
+ wmem_list_foreach(saved_uat_opts, bootp_clear_uat_bootpopt,
+ NULL);
- wmem_destroy_list(saved_uat_opts);
- saved_uat_opts = NULL;
+ wmem_destroy_list(saved_uat_opts);
+ saved_uat_opts = NULL;
+ }
}