diff --git a/src/output/plugins/JackOutputPlugin.cxx b/src/output/plugins/JackOutputPlugin.cxx index 2c13f7845..6b6289eb7 100644 --- a/src/output/plugins/JackOutputPlugin.cxx +++ b/src/output/plugins/JackOutputPlugin.cxx @@ -537,7 +537,10 @@ JackOutput::Start() jports = nullptr; } - AtScopeExit(jports) { free(jports); }; + AtScopeExit(jports) { + if (jports != nullptr) + jack_free(jports); + }; assert(num_dports > 0);