Use tvb_get_ephemeral_string() to avoid memleak.
svn path=/trunk/; revision=30001
This commit is contained in:
parent
47bdc0fda3
commit
57659e8133
|
@ -1595,7 +1595,7 @@ static void dissect_zcl_attr_data(tvbuff_t *tvb, proto_tree *tree, guint *offset
|
|||
}
|
||||
*offset += sizeof(guint8);
|
||||
|
||||
attr_string = tvb_get_string(tvb, *offset, attr_uint);
|
||||
attr_string = tvb_get_ephemeral_string(tvb, *offset, attr_uint);
|
||||
if ( tree ) {
|
||||
proto_item_append_text(tree, ", String: %s", attr_string);
|
||||
|
||||
|
@ -1639,7 +1639,7 @@ static void dissect_zcl_attr_data(tvbuff_t *tvb, proto_tree *tree, guint *offset
|
|||
}
|
||||
*offset += sizeof(guint16);
|
||||
|
||||
attr_string = tvb_get_string(tvb, *offset, attr_uint);
|
||||
attr_string = tvb_get_ephemeral_string(tvb, *offset, attr_uint);
|
||||
if ( tree ) {
|
||||
proto_item_append_text(tree, ", String: %s", attr_string);
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ static void dissect_zep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
dissector_handle_t next_dissector;
|
||||
|
||||
/* Determine whether this is a Q51/IEEE 802.15.4 sniffer packet or not */
|
||||
if(strcmp(tvb_get_string(tvb, 0, 2), ZEP_PREAMBLE)){
|
||||
if(strcmp(tvb_get_ephemeral_string(tvb, 0, 2), ZEP_PREAMBLE)){
|
||||
/* This is not a Q51/ZigBee sniffer packet */
|
||||
call_dissector(data_handle, tvb, pinfo, tree);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue