From 7054b2e43ee636dc4882bbd5fd7cc56b93e7f339 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 2 Jul 2019 16:13:24 +0200 Subject: Fix use of free_rs_char on null pointer --- src/odr-audioenc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp index 5f95538..6347c90 100644 --- a/src/odr-audioenc.cpp +++ b/src/odr-audioenc.cpp @@ -1210,7 +1210,9 @@ AudioEnc::~AudioEnc() file_output.reset(); zmq_output.reset(); - free_rs_char(rs_handler); + if (rs_handler != nullptr) { + free_rs_char(rs_handler); + } if (selected_encoder == encoder_selection_t::fdk_dabplus) { aacEncClose(&encoder); -- cgit v1.2.3