Changeset 4957:45ba4cf2abe3 in roaraudio for roard/light.c
- Timestamp:
- 05/13/11 23:30:17 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/light.c
r4708 r4957 37 37 return -1; 38 38 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); 45 45 return -1; 46 46 } … … 49 49 50 50 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); 52 52 return -1; 53 53 } … … 70 70 int light_free (void) { 71 71 if ( g_light_state.state != NULL ) { 72 free(g_light_state.state);72 roar_mm_free(g_light_state.state); 73 73 } 74 74 75 75 if ( g_light_state.changes != NULL ) { 76 free(g_light_state.changes);76 roar_mm_free(g_light_state.changes); 77 77 } 78 78
Note: See TracChangeset
for help on using the changeset viewer.