diff options
Diffstat (limited to 'pd/portaudio/pa_common/pa_allocation.c')
-rw-r--r-- | pd/portaudio/pa_common/pa_allocation.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pd/portaudio/pa_common/pa_allocation.c b/pd/portaudio/pa_common/pa_allocation.c index 8bc7c72f..035b4d0b 100644 --- a/pd/portaudio/pa_common/pa_allocation.c +++ b/pd/portaudio/pa_common/pa_allocation.c @@ -1,5 +1,5 @@ /* - * $Id: pa_allocation.c,v 1.1.2.5 2003/09/20 21:04:44 rossbencina Exp $ + * $Id: pa_allocation.c,v 1.1.2.6 2004/12/20 12:07:51 rossbencina Exp $ * Portable Audio I/O Library allocation group implementation * memory allocation group for tracking allocation groups * @@ -184,12 +184,22 @@ void PaUtil_GroupFreeMemory( PaUtilAllocationGroup* group, void *buffer ) { if( current->buffer == buffer ) { - previous->next = current->next; + if( previous ) + { + previous->next = current->next; + } + else + { + group->allocations = current->next; + } current->buffer = 0; current->next = group->spareLinks; group->spareLinks = current; + + break; } + previous = current; current = current->next; } |