aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-11-03 01:10:55 -0700
committerpx4dev <px4@purgatory.org>2012-11-03 01:14:25 -0700
commit37682f852f9216bc541d4d03b6d6dfa0b320e318 (patch)
treeefc6a5ea26599d6680bc2707172a2ac87229f9e1
parentf11cf48bb9e41dfbb20df898c2f7409441890651 (diff)
downloadpx4-firmware-37682f852f9216bc541d4d03b6d6dfa0b320e318.tar.gz
px4-firmware-37682f852f9216bc541d4d03b6d6dfa0b320e318.tar.bz2
px4-firmware-37682f852f9216bc541d4d03b6d6dfa0b320e318.zip
Clean up perf counters attached to an HX protocol stream.
-rw-r--r--apps/systemlib/hx_stream.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/systemlib/hx_stream.c b/apps/systemlib/hx_stream.c
index aabb786d4..8d77f14a8 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);
}