fix a bunch of memory leaks
[ardour.git] / libs / ardour / io.cc
index ebd295411e9cdfaf3d5198e0c36f0a737cd86d92..2cc213f7975932624527f6ee58cd1c850aa14c01 100644 (file)
@@ -1414,7 +1414,7 @@ IO::find_port_hole (const char* base)
                std::vector<char> buf (AudioEngine::instance()->port_name_size());
                PortSet::iterator i = _ports.begin();
 
-               snprintf (&buf[0], jack_port_name_size(), _("%s %u"), base, n);
+               snprintf (&buf[0], buf.size()+1, _("%s %u"), base, n);
 
                for ( ; i != _ports.end(); ++i) {
                        if (string(i->name()) == string(&buf[0])) {