Fixed server crash when using invalid iterator for end position

This commit is contained in:
Pauli Nieminen 2008-01-31 23:32:07 +00:00
parent 7b101e6b6f
commit 6726b67c74

View File

@ -653,10 +653,10 @@ namespace
{
//! Caller has to make sure to own management_mutex
static void remove_buffers(TCPsocket sock)
void remove_buffers(TCPsocket sock)
{
{
for(buffer_set::iterator i = bufs.begin(), i_end = bufs.end(); i != i_end;) {
for(buffer_set::iterator i = bufs.begin(); i != bufs.end();) {
if ((*i)->sock == sock)
{
buffer* buf = *i;