aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/erf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-07-17 18:56:38 -0700
committerGuy Harris <guy@alum.mit.edu>2017-07-18 01:58:08 +0000
commit30f8ceebbad01f1040b492599d26e0f01e0824f1 (patch)
treeca591a60f7098deed4ff201c6ab68da34eb379b1 /wiretap/erf.c
parent74a2ae4abac3be78d140d9671fa79977de449ed1 (diff)
Remove unnecessary test.
The default case ends with return, so the pointer won't be null by the time out exit the case statement - either a non-default case is processed and tag_ptr hasn't been set to null, or the default case is processed and you return before getting there. That also means we don't need to set tag_ptr to null in that case. Fixes CIDs 1415436. Change-Id: I21ada7a308d888b4cbb8557197a2e30bda118f44 Reviewed-on: https://code.wireshark.org/review/22691 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/erf.c')
-rw-r--r--wiretap/erf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c
index 34c0f34b47..a05a6c533c 100644
--- a/wiretap/erf.c
+++ b/wiretap/erf.c
@@ -1051,13 +1051,10 @@ static void erf_write_wtap_option_to_host_tag(wtap_block_t block _U_,
break;
default:
erf_meta_tag_free(tag_ptr);
- tag_ptr = NULL;
return;
}
- if (tag_ptr)
- g_ptr_array_add(section_ptr->tags, tag_ptr);
-
+ g_ptr_array_add(section_ptr->tags, tag_ptr);
}
static void erf_write_wtap_option_to_interface_tag(wtap_block_t block _U_,