Changeset 3021:a7929173bb2c in roaraudio


Ignore:
Timestamp:
10/31/09 14:23:21 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

do not enlarge no-free buffers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/buffer.c

    r3020 r3021  
    329329 
    330330 if ( len > buf->user_len ) { 
     331  // we can only enlage a buffer if it's one of our own memory segments 
     332  if ( buf->flags & ROAR_BUFFER_FLAG_NOFREE ) 
     333   return -1; 
     334 
    331335  totlen = buf->len - buf->user_len + len; 
    332   newbuf = realloc(buf->data, totlen); 
     336  newbuf = roar_mm_realloc(buf->data, totlen); 
    333337  if ( newbuf == NULL ) 
    334338   return -1; 
Note: See TracChangeset for help on using the changeset viewer.