fix a small memleak.
downcase(char*) requires free(), downcase(std::string) does not.
This commit is contained in:
parent
1ebe22eeed
commit
b7fbd4e9c0
@ -951,7 +951,7 @@ EngineControl::backend_changed ()
|
|||||||
string backend_name = backend_combo.get_active_text();
|
string backend_name = backend_combo.get_active_text();
|
||||||
boost::shared_ptr<ARDOUR::AudioBackend> backend;
|
boost::shared_ptr<ARDOUR::AudioBackend> backend;
|
||||||
|
|
||||||
if (!(backend = ARDOUR::AudioEngine::instance()->set_backend (backend_name, downcase (PROGRAM_NAME), ""))) {
|
if (!(backend = ARDOUR::AudioEngine::instance()->set_backend (backend_name, downcase (std::string(PROGRAM_NAME)), ""))) {
|
||||||
/* eh? setting the backend failed... how ? */
|
/* eh? setting the backend failed... how ? */
|
||||||
/* A: stale config contains a backend that does not exist in current build */
|
/* A: stale config contains a backend that does not exist in current build */
|
||||||
return;
|
return;
|
||||||
@ -1978,7 +1978,7 @@ EngineControl::set_current_state (const State& state)
|
|||||||
boost::shared_ptr<ARDOUR::AudioBackend> backend;
|
boost::shared_ptr<ARDOUR::AudioBackend> backend;
|
||||||
|
|
||||||
if (!(backend = ARDOUR::AudioEngine::instance ()->set_backend (
|
if (!(backend = ARDOUR::AudioEngine::instance ()->set_backend (
|
||||||
state->backend, downcase (PROGRAM_NAME), ""))) {
|
state->backend, downcase (std::string(PROGRAM_NAME)), ""))) {
|
||||||
DEBUG_ECONTROL (string_compose ("Unable to set backend to %1", state->backend));
|
DEBUG_ECONTROL (string_compose ("Unable to set backend to %1", state->backend));
|
||||||
// this shouldn't happen as the invalid backend names should have been
|
// this shouldn't happen as the invalid backend names should have been
|
||||||
// removed from the list of states.
|
// removed from the list of states.
|
||||||
|
Loading…
Reference in New Issue
Block a user