aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-hartip.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-06-04 12:15:34 -0700
committerGuy Harris <guy@alum.mit.edu>2017-06-04 19:16:12 +0000
commitb58e23846e4f21318efebca138f9aa3b0e26792d (patch)
treeacb665935597fbda6ae59c13388ef690e5e055a9 /epan/dissectors/packet-hartip.c
parent6d29f50d61de03f73a2a9336378b1c846ae65924 (diff)
Allocate the pipe capture data buffer upfront.
We were allocating it every time we called cap_pipe_dispatch() (or, prior to I0256daae8478f1100fdde96a16a404465ec200b3, in capture_loop_dispatch()) and freeing it before the routine in question returned. However, we were treating that buffer as if it persisted from call to call, which worked *only* if freeing and re-allocating the buffer meant that we'd get back the same buffer with its previous contents intact. That is *not* guaranteed to work. Instead, allocate the buffer when we open the capture pipe, and free it when we close the capture pipe. Change-Id: Ic785b1f47b71b55aba426db3b1e868186c265263 Reviewed-on: https://code.wireshark.org/review/21948 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-hartip.c')
0 files changed, 0 insertions, 0 deletions