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>
This commit is contained in:
parent
74a2ae4aba
commit
30f8ceebba
|
@ -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_,
|
||||
|
|
Loading…
Reference in New Issue