From 37682f852f9216bc541d4d03b6d6dfa0b320e318 Mon Sep 17 00:00:00 2001 From: px4dev Date: Sat, 3 Nov 2012 01:10:55 -0700 Subject: [PATCH] Clean up perf counters attached to an HX protocol stream. --- apps/systemlib/hx_stream.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/systemlib/hx_stream.c b/apps/systemlib/hx_stream.c index aabb786d48..8d77f14a8d 100644 --- a/apps/systemlib/hx_stream.c +++ b/apps/systemlib/hx_stream.c @@ -160,6 +160,11 @@ hx_stream_init(int fd, void hx_stream_free(hx_stream_t stream) { + /* free perf counters (OK if they are NULL) */ + perf_free(stream->pc_tx_frames); + perf_free(stream->pc_rx_frames); + perf_free(stream->pc_rx_errors); + free(stream); }