diff options
author | Evan Huus <eapache@gmail.com> | 2012-12-02 17:01:04 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2012-12-02 17:01:04 +0000 |
commit | b9c6f71fe48857a1d077b3ce064fad880396067e (patch) | |
tree | 4ea8b5592f4aaeea56d720deefb3d5960f94f8e8 /epan/packet.c | |
parent | 2461373edd7260ffc2c540dd9682f92fd05f5ebb (diff) |
Create a wmem pool in pinfo and use it for some address allocations.
A (better?) fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8030
See also thread starting at:
http://www.wireshark.org/lists/wireshark-dev/201212/msg00001.html
svn path=/trunk/; revision=46331
Diffstat (limited to 'epan/packet.c')
-rw-r--r-- | epan/packet.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/packet.c b/epan/packet.c index 5e1c180b3c..1f371463db 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -319,9 +319,13 @@ void dissect_packet(epan_dissect_t *edt, struct wtap_pkthdr *phdr, const guchar *pd, frame_data *fd, column_info *cinfo) { + /* We have to preserve the pool pointer across the memzeroing */ + wmem_allocator_t *tmp = edt->pi.pool; + if (cinfo != NULL) col_init(cinfo); memset(&edt->pi, 0, sizeof(edt->pi)); + edt->pi.pool = tmp; edt->pi.current_proto = "<Missing Protocol Name>"; edt->pi.cinfo = cinfo; edt->pi.fd = fd; |