aboutsummaryrefslogtreecommitdiff
path: root/tools/ootx_decode/ootx_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ootx_decode/ootx_decoder.c')
-rw-r--r--tools/ootx_decode/ootx_decoder.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/ootx_decode/ootx_decoder.c b/tools/ootx_decode/ootx_decoder.c
index dc5d50a..f308bfb 100644
--- a/tools/ootx_decode/ootx_decoder.c
+++ b/tools/ootx_decode/ootx_decoder.c
@@ -33,6 +33,12 @@ void ootx_init_decoder_context(ootx_decoder_context *ctx) {
*(ctx->payload_size) = 0;
}
+void ootx_free_decoder_context(ootx_decoder_context *ctx) {
+ free(ctx->buffer);
+ ctx->buffer = NULL;
+ ctx->payload_size = NULL;
+}
+
/*
how to decode pulses
ticks>2000 && delta>100000== master lighthouse