Changeset 3063:955233719a84 in roaraudio for libroar/vio_cmd.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
  • libroar/vio_cmd.c

    r1663 r3063  
    4646  return -1; 
    4747 
    48  if ( (state = malloc(sizeof(struct roar_vio_cmd_state))) == NULL ) 
     48 if ( (state = roar_mm_malloc(sizeof(struct roar_vio_cmd_state))) == NULL ) 
    4949  return -1; 
    5050 
     
    132132 
    133133// state->state = ROAR_VIO_CMD_STATE_CLOSED; 
    134  free(state); 
     134 roar_mm_free(state); 
    135135 
    136136 return 0; 
     
    226226  return -1; 
    227227 
    228  if ( (state = malloc(sizeof(struct roar_vio_2popen_state))) == NULL ) 
     228 if ( (state = roar_mm_malloc(sizeof(struct roar_vio_2popen_state))) == NULL ) 
    229229  return -1; 
    230230 
     
    282282  free(state->child.cmd); 
    283283 
    284  free(state); 
     284 roar_mm_free(state); 
    285285 
    286286 return 0; 
Note: See TracChangeset for help on using the changeset viewer.