forked from osmocom/wireshark
JXTA: replace g_strsplit by wmem_strsplit
It avoids leaking memory in case an exception is thrown during dissection Bug: 14050 Change-Id: Ia17855646774ffa7bd93e0c8d578fa30f4df1394 Reviewed-on: https://code.wireshark.org/review/23463 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
d4df5b8ee5
commit
4a2923d78b
|
@ -862,7 +862,7 @@ static int dissect_jxta_welcome(tvbuff_t * tvb, packet_info * pinfo, proto_tree
|
|||
proto_item *jxta_welcome_tree_item = NULL;
|
||||
proto_tree *jxta_welcome_tree = NULL;
|
||||
|
||||
tokens = g_strsplit(welcomeline, " ", 255);
|
||||
tokens = wmem_strsplit(wmem_packet_scope(), welcomeline, " ", 255);
|
||||
current_token = tokens;
|
||||
|
||||
if (tree) {
|
||||
|
@ -1005,8 +1005,6 @@ static int dissect_jxta_welcome(tvbuff_t * tvb, packet_info * pinfo, proto_tree
|
|||
}
|
||||
|
||||
Common_Exit:
|
||||
g_strfreev(tokens);
|
||||
|
||||
col_set_writable(pinfo->cinfo, -1, FALSE);
|
||||
|
||||
return afterwelcome;
|
||||
|
|
Loading…
Reference in New Issue