Changeset 4957:45ba4cf2abe3 in roaraudio for roard/light.c


Ignore:
Timestamp:
05/13/11 23:30:17 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use roar_mm_*() where possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/light.c

    r4708 r4957  
    3737  return -1; 
    3838 
    39  if ( (g_light_state.state = malloc(channels)) == NULL ) { 
    40   return -1; 
    41  } 
    42  
    43  if ( (g_light_state.changes = malloc(channels)) == NULL ) { 
    44   free(g_light_state.state); 
     39 if ( (g_light_state.state = roar_mm_malloc(channels)) == NULL ) { 
     40  return -1; 
     41 } 
     42 
     43 if ( (g_light_state.changes = roar_mm_malloc(channels)) == NULL ) { 
     44  roar_mm_free(g_light_state.state); 
    4545  return -1; 
    4646 } 
     
    4949 
    5050 if ( (g_light_mixer.stream = add_mixer(ROAR_SUBSYS_LIGHT, _MIXER_NAME("Light Control"), &ss)) == -1 ) { 
    51   free(g_light_state.state); 
     51  roar_mm_free(g_light_state.state); 
    5252  return -1; 
    5353 } 
     
    7070int light_free  (void) { 
    7171 if ( g_light_state.state != NULL ) { 
    72   free(g_light_state.state); 
     72  roar_mm_free(g_light_state.state); 
    7373 } 
    7474 
    7575 if ( g_light_state.changes != NULL ) { 
    76   free(g_light_state.changes); 
     76  roar_mm_free(g_light_state.changes); 
    7777 } 
    7878 
Note: See TracChangeset for help on using the changeset viewer.