diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2018-12-19 08:17:33 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-12-19 11:40:57 +0000 |
commit | d749beafb923a8a4ca76ac3dfb0e8e1cdbc328ad (patch) | |
tree | 776639915c17ddeb73037dcb775bc8eb7391391d /epan/dissectors | |
parent | 9132725ab0ece71b121429210e216f10b238139d (diff) |
rfc7468: Fix a memory leak
Read the base64 decoded data into a wmem_alloc memory to avoid
a memory leak for each opened file.
Change-Id: I4cbb2c15dea43183ed741d54ae7c6ea2e83e46c0
Reviewed-on: https://code.wireshark.org/review/31112
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/file-rfc7468.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/file-rfc7468.c b/epan/dissectors/file-rfc7468.c index 4825dc9aa6..d9253aea56 100644 --- a/epan/dissectors/file-rfc7468.c +++ b/epan/dissectors/file-rfc7468.c @@ -296,7 +296,7 @@ dissect_rfc7468(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data * First, grow the buffer as needed. */ databufsize += (linelen / 4) * 3 + 3; - databuf = (guint8 *)g_realloc(databuf, databufsize); + databuf = (guint8 *)wmem_realloc(pinfo->pool, databuf, databufsize); /* * Now decode into it. |