aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-telnet.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-07-19 22:53:28 -0400
committerEvan Huus <eapache@gmail.com>2016-07-20 22:12:56 +0000
commitbe1398c17ca1d5b203a930d9254125d602830aef (patch)
tree611a6c211931f45a32d65199fa65c4a5a36fec2f /epan/dissectors/packet-telnet.c
parente07b4aa6670f57be7f613eec9d8d47712d1cfa86 (diff)
Convert uses of g_alloced data with tvb_new_child_real_data to use pinfo->pool instead.
Aldo update documentation to suggest using wmem pinfo->pool instead of glib memory Change-Id: I5d34cc6c1515aa9f0d57784b38da501ffcb95ccc Reviewed-on: https://code.wireshark.org/review/16551 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-telnet.c')
-rw-r--r--epan/dissectors/packet-telnet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-telnet.c b/epan/dissectors/packet-telnet.c
index 7345d080b7..577b9660df 100644
--- a/epan/dissectors/packet-telnet.c
+++ b/epan/dissectors/packet-telnet.c
@@ -1050,7 +1050,7 @@ unescape_and_tvbuffify_telnet_option(packet_info *pinfo, tvbuff_t *tvb, int offs
return NULL;
spos=tvb_get_ptr(tvb, offset, len);
- buf=(guint8 *)g_malloc(len);
+ buf=(guint8 *)wmem_alloc(pinfo->pool, len);
dpos=buf;
skip=0;
l=len;
@@ -1066,7 +1066,6 @@ unescape_and_tvbuffify_telnet_option(packet_info *pinfo, tvbuff_t *tvb, int offs
l--;
}
krb5_tvb = tvb_new_child_real_data(tvb, buf, len-skip, len-skip);
- tvb_set_free_cb(krb5_tvb, g_free);
add_new_data_source(pinfo, krb5_tvb, "Unpacked Telnet Option");
return krb5_tvb;