aboutsummaryrefslogtreecommitdiffstats
path: root/src/odr-audioenc.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-07-02 16:13:24 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-07-02 16:13:24 +0200
commit7054b2e43ee636dc4882bbd5fd7cc56b93e7f339 (patch)
treea8ca252f9ece78342d1793cf76557c8d783ac59c /src/odr-audioenc.cpp
parent2c41070f6691ed98a93b245b4ecb17fd898002ab (diff)
downloadODR-AudioEnc-7054b2e43ee636dc4882bbd5fd7cc56b93e7f339.tar.gz
ODR-AudioEnc-7054b2e43ee636dc4882bbd5fd7cc56b93e7f339.tar.bz2
ODR-AudioEnc-7054b2e43ee636dc4882bbd5fd7cc56b93e7f339.zip
Fix use of free_rs_char on null pointer
Diffstat (limited to 'src/odr-audioenc.cpp')
-rw-r--r--src/odr-audioenc.cpp4
1 files changed, 3 insertions, 1 deletions
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);