diff options
author | Evan Huus <eapache@gmail.com> | 2015-07-03 21:14:53 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-07-04 12:21:34 +0000 |
commit | ebae0c98f8556b9533cd1bb21c4bac548ab5e470 (patch) | |
tree | c1c00d293789181af907986dd1a0c68966b02f47 /epan/dissectors/packet-tcp.c | |
parent | dd8311d2ed09c34fd7b7206ed9ea95b8cee7c85a (diff) |
store tcp/udp port names in epan scope
This causes them to be freed on shutdown, cleaning up ~800KB of "reachable"
memory according to valgrind. The fact that we even need to construct these as
value_strings is questionable IMHO, but that's a problem for a later date.
Switch epan_scope to the BLOCK allocator now that we're using it for so much
more, this gives a small but measurable increase in startup time.
Change-Id: I187460b769e28da3c6629abac1d9196727ae7dde
Reviewed-on: https://code.wireshark.org/review/9483
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-tcp.c')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 6ad4619b1e..8511762b31 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -5985,7 +5985,7 @@ proto_register_tcp(void) gbl_resolv_flags.transport_name = TRUE; for (i = 0, j = 0; i <= 65535; i++) { - const char *serv = tcp_port_to_display(NULL, i); + const char *serv = tcp_port_to_display(wmem_epan_scope(), i); if (serv) { value_string *p = &tcp_ports[j++]; |