forked from osmocom/wireshark
Avoid using ephemeral memory in register routines.
svn path=/trunk/; revision=54423
This commit is contained in:
parent
a0321ddb9d
commit
e805778692
|
@ -5306,9 +5306,9 @@ proto_register_asn1(void) {
|
||||||
"ASN.1 messages will be read",
|
"ASN.1 messages will be read",
|
||||||
10, &global_sctp_port_asn1);
|
10, &global_sctp_port_asn1);
|
||||||
#else
|
#else
|
||||||
range_convert_str(&global_tcp_ports_asn1, ep_strdup_printf("%u", TCP_PORT_ASN1), 65535);
|
range_convert_str(&global_tcp_ports_asn1, "0", 65535);
|
||||||
range_convert_str(&global_udp_ports_asn1, ep_strdup_printf("%u", UDP_PORT_ASN1), 65535);
|
range_convert_str(&global_udp_ports_asn1, "0", 65535);
|
||||||
range_convert_str(&global_sctp_ports_asn1, ep_strdup_printf("%u", SCTP_PORT_ASN1), 65535);
|
range_convert_str(&global_sctp_ports_asn1, "0", 65535);
|
||||||
|
|
||||||
prefs_register_range_preference(asn1_module, "tcp_ports",
|
prefs_register_range_preference(asn1_module, "tcp_ports",
|
||||||
"ASN.1 TCP Ports",
|
"ASN.1 TCP Ports",
|
||||||
|
|
|
@ -129,6 +129,7 @@ static const char* g_szMessageTypes[] =
|
||||||
*/
|
*/
|
||||||
void proto_register_opcua(void)
|
void proto_register_opcua(void)
|
||||||
{
|
{
|
||||||
|
char *tmp;
|
||||||
|
|
||||||
static hf_register_info hf[] =
|
static hf_register_info hf[] =
|
||||||
{
|
{
|
||||||
|
@ -195,7 +196,9 @@ void proto_register_opcua(void)
|
||||||
|
|
||||||
proto_register_subtree_array(ett, array_length(ett));
|
proto_register_subtree_array(ett, array_length(ett));
|
||||||
|
|
||||||
range_convert_str(&global_tcp_ports_opcua, ep_strdup_printf("%u", OPCUA_PORT), 65535);
|
tmp = g_strdup_printf("%d", OPCUA_PORT);
|
||||||
|
range_convert_str(&global_tcp_ports_opcua, tmp, 65535);
|
||||||
|
g_free(tmp);
|
||||||
|
|
||||||
reassembly_table_init(&opcua_reassembly_table,
|
reassembly_table_init(&opcua_reassembly_table,
|
||||||
&addresses_reassembly_table_functions);
|
&addresses_reassembly_table_functions);
|
||||||
|
|
Loading…
Reference in New Issue