diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-08-28 19:27:52 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-08-29 01:05:28 +0000 |
commit | 9b272d8c8034b07f1b87347e358e83cbf1b32393 (patch) | |
tree | a4a7ee536785136713ff7c14cd20a01b8a1ea9d2 /epan/dissectors/packet-pmproxy.c | |
parent | 0bae8424fe651ea5de1f7e160666781e60ce3c86 (diff) |
tproxy: fix memleak in is_banner_exchange_for
strdup and strcmp is a recipe for leaking.
Change-Id: I522c71964e39f671a4101df9b2b432433fc1c12e
Reviewed-on: https://code.wireshark.org/review/17363
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-pmproxy.c')
-rw-r--r-- | epan/dissectors/packet-pmproxy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-pmproxy.c b/epan/dissectors/packet-pmproxy.c index 615ffa2256..e8ec8a037f 100644 --- a/epan/dissectors/packet-pmproxy.c +++ b/epan/dissectors/packet-pmproxy.c @@ -116,7 +116,7 @@ static int is_banner_exchange_for(const gchar *type, tvbuff_t *tvb) { pmproxy_exchange_string = (gchar *) tvb_get_string_enc(wmem_packet_scope(), tvb, PMPROXY_START_OF_PACKET, PMPROXY_CLIENT_SERVER_VERSION_LENGTH, ENC_ASCII); - return g_strcmp0(pmproxy_exchange_string, g_strdup_printf("pmproxy-%s 1\n", type)) == 0; + return g_strcmp0(pmproxy_exchange_string, wmem_strdup_printf(wmem_packet_scope(), "pmproxy-%s 1\n", type)) == 0; } static int is_server_exchange(tvbuff_t *tvb) { |