Fix a few tiny memory leaks.

git-svn-id: svn://localhost/ardour2/branches/3.0@8244 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington
2010-12-11 02:34:44 +00:00
parent e8fede43ee
commit 173354c847
4 changed files with 6 additions and 13 deletions

View File

@@ -1180,13 +1180,10 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
break;
}
label_cstr = new char[label_string.size() + 1];
strcpy(label_cstr, label_string.c_str());
if (for_input) {
input_label.set_text (label_cstr);
input_label.set_text (label_string);
} else {
output_label.set_text (label_cstr);
output_label.set_text (label_string);
}
}

View File

@@ -210,12 +210,12 @@ ControlProtocolManager::control_protocol_discover (string path)
if ((descriptor = get_descriptor (path)) != 0) {
ControlProtocolInfo* cpi = new ControlProtocolInfo ();
if (!descriptor->probe (descriptor)) {
info << string_compose (_("Control protocol %1 not usable"), descriptor->name) << endmsg;
} else {
ControlProtocolInfo* cpi = new ControlProtocolInfo ();
cpi->descriptor = descriptor;
cpi->name = descriptor->name;
cpi->path = path;

View File

@@ -154,9 +154,7 @@ MidiControlUI::thread_init ()
{
struct sched_param rtparam;
char* c = new char[7];
strcpy (c, X_("midiUI"));
pthread_set_name (c);
pthread_set_name (X_("midiUI"));
PBD::notify_gui_about_thread_creation (X_("gui"), pthread_self(), X_("MIDI"), 2048);
SessionEvent::create_per_thread_pool (X_("MIDI I/O"), 128);

View File

@@ -224,9 +224,7 @@ OSC::start ()
void
OSC::thread_init ()
{
char* c = new char[4];
strcpy (c, X_("OSC"));
pthread_set_name (c);
pthread_set_name (X_("OSC"));
if (_osc_unix_server) {
Glib::RefPtr<IOSource> src = IOSource::create (lo_server_get_socket_fd (_osc_unix_server), IO_IN|IO_HUP|IO_ERR);