Changeset 3386:89f9ef49c056 in roaraudio
- Timestamp:
- 02/11/10 13:03:42 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/simple.c
r3385 r3386 51 51 int *error /**< A pointer where the error code is stored when the routine returns NULL. It is OK to pass NULL here. */ 52 52 ) { 53 struct roarpulse_simple * s = malloc(sizeof(struct roarpulse_simple));53 struct roarpulse_simple * s = roar_mm_malloc(sizeof(struct roarpulse_simple)); 54 54 struct roar_audio_info info; 55 55 int roar_dir; … … 64 64 roar_dir = ROAR_DIR_RECORD; 65 65 } else { 66 free(s);66 roar_mm_free(s); 67 67 return NULL; 68 68 } 69 69 70 70 if ( roar_pa_sspec2auinfo(&info, ss) == -1 ) { 71 free(s);71 roar_mm_free(s); 72 72 return NULL; 73 73 } … … 77 77 78 78 if ( roar_simple_connect(&(s->con), (char*)server, (char*)name) == -1 ) { 79 free(s);79 roar_mm_free(s); 80 80 return NULL; 81 81 } … … 85 85 info.bits, info.codec, roar_dir) == -1 ) { 86 86 roar_disconnect(&(s->con)); 87 free(s);87 roar_mm_free(s); 88 88 return NULL; 89 89 } … … 109 109 roar_disconnect(&(ss->con)); 110 110 111 free(s);111 roar_mm_free(s); 112 112 } 113 113
Note: See TracChangeset
for help on using the changeset viewer.