Changeset 3063:955233719a84 in roaraudio for roard/streams.c


Ignore:
Timestamp:
12/26/09 20:36:31 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use memory functions from libroar, not libc, fixed a small memory leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/streams.c

    r3042 r3063  
    6868 for (i = 0; i < ROAR_STREAMS_MAX; i++) { 
    6969  if ( g_streams[i] == NULL ) { 
    70    s = ROAR_STREAM_SERVER(n = ROAR_STREAM(malloc(sizeof(struct roar_stream_server)))); 
     70   s = ROAR_STREAM_SERVER(n = ROAR_STREAM(roar_mm_malloc(sizeof(struct roar_stream_server)))); 
    7171   if ( n == NULL ) { 
    7272    ROAR_ERR("streams_new(void): can not allocate memory for new stream: %s", strerror(errno)); 
     
    252252  free(s->name); 
    253253 
    254  free(s); 
     254 roar_mm_free(s); 
    255255 
    256256 g_streams[id] = NULL; 
Note: See TracChangeset for help on using the changeset viewer.