Before freeing "next", it should have been removed already...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19422 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-12-04 16:15:21 +00:00
parent 64222e845d
commit 6cf91f9542

View File

@ -132,8 +132,11 @@ BufferQueue::Add(net_buffer *buffer, tcp_sequence sequence)
&& tcp_sequence(sequence + buffer->size) > next->sequence) {
// we already have at least part of this data
if (tcp_sequence(next->sequence + next->size) < sequence + buffer->size) {
gBufferModule->free(next);
net_buffer *remove = next;
next = (net_buffer *)next->link.next;
fList.Remove(remove);
gBufferModule->free(remove);
} else
gBufferModule->remove_trailer(buffer, next->sequence - (sequence + buffer->size));
}