diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2017-09-02 13:17:04 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2017-09-02 13:17:26 +0000 |
commit | 6fb8aa9a81ac7fcda4733d48555b09ca27dfacad (patch) | |
tree | c8b057e82eefcfa7efc2ffbb90c85258e99b76f7 /epan/dissectors/packet-wsp.c | |
parent | a66a216820f877881217485388b86c73722b351d (diff) |
WSP: allocate content type string in wmem pool
Let's use the pinfo pool as the string can be added to pinfo structure.
Bug: 14032
Change-Id: I195b6e216c89e22c8011886826adbbbd1cd32b11
Reviewed-on: https://code.wireshark.org/review/23358
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-wsp.c')
-rw-r--r-- | epan/dissectors/packet-wsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c index e2db2f5b13..bbfa4e7a24 100644 --- a/epan/dissectors/packet-wsp.c +++ b/epan/dissectors/packet-wsp.c @@ -1637,7 +1637,7 @@ add_content_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint32 va proto_tree_add_string(tree, hf_hdr_content_type, tvb, hdr_start, offset - hdr_start, val_str); - *textual_content = g_strdup(val_str); + *textual_content = wmem_strdup(pinfo->pool, val_str); *well_known_content = 0; } else { proto_tree_add_string(tree, hf_hdr_content_type, @@ -1658,7 +1658,7 @@ add_content_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint32 va tvb, hdr_start, offset - hdr_start, val_str); } /* Following statement: required? */ - *textual_content = g_strdup(val_str); + *textual_content = wmem_strdup(pinfo->pool, val_str); *well_known_content = 0; } else if (is_integer_value(peek)) { get_integer_value(val, tvb, off, len, ok); |