Changeset 5295:5914c84e72be in roaraudio
- Timestamp:
- 11/24/11 19:43:11 (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r5292 r5295 1 1 v. 1.0beta0 - ? 2 * Updated API (SONAME change) (Closes: #184, #185, #128, #135, #134, #133 )2 * Updated API (SONAME change) (Closes: #184, #185, #128, #135, #134, #133, #129) 3 3 * Do not set errno to zero in ogg_vorbis codec filter (Closes: #191) 4 4 * Updated data types for struct roar_audio_info (Closes: #189) -
libroar/auth.c
r5158 r5295 145 145 146 146 if ( mes.datalen > sizeof(mes.data) ) { 147 data = malloc(mes.datalen);147 data = roar_mm_malloc(mes.datalen); 148 148 if ( data == NULL ) 149 149 return -1; … … 208 208 209 209 if ( data != NULL ) 210 free(data);210 roar_mm_free(data); 211 211 212 212 ROAR_DBG("roar_auth_ask_server(con=%p, authmes=%p) = %i // next: %i", con, authmes, ret, authmes->type); … … 418 418 419 419 if ( (ames->len + 4) > sizeof(mes->data) ) { 420 *data = malloc(ames->len + 4);420 *data = roar_mm_malloc(ames->len + 4); 421 421 if ( *data == NULL ) 422 422 return -1; -
libroar/caps.c
r5149 r5295 57 57 return -1; 58 58 59 if ( (*data = malloc(needlen)) == NULL )59 if ( (*data = roar_mm_malloc(needlen)) == NULL ) 60 60 return -1; 61 61 … … 179 179 if ( mes.cmd != ROAR_CMD_OK ) { 180 180 if ( data != NULL ) 181 free(data);181 roar_mm_free(data); 182 182 return -1; 183 183 } … … 185 185 if ( roar_caps_from_msg(&caps, &mes, data) == -1 ) { 186 186 if ( data != NULL ) 187 free(data);187 roar_mm_free(data); 188 188 return -1; 189 189 } … … 192 192 if ( caps.version != 0 || caps.type != ROAR_CT_STANDARDS || (caps.len & 0x3) != 0 ) { 193 193 if ( data != NULL ) 194 free(data);194 roar_mm_free(data); 195 195 return -1; 196 196 } … … 200 200 if ( *out == NULL ) { 201 201 if ( data != NULL ) 202 free(data);202 roar_mm_free(data); 203 203 return -1; 204 204 } … … 213 213 214 214 if ( data != NULL ) 215 free(data);215 roar_mm_free(data); 216 216 217 217 return 0; -
libroar/error.c
r5286 r5295 100 100 101 101 roar_err_clear_errno(); 102 *data = malloc(datalen);102 *data = roar_mm_malloc(datalen); 103 103 roar_err_from_errno(); 104 104 if ( *data == NULL ) -
libroar/ltm.c
r5270 r5295 137 137 138 138 if ( buf != NULL ) 139 free(buf);139 roar_mm_free(buf); 140 140 141 141 if ( ret != -1 ) { … … 194 194 if ( ret == -1 || mes.cmd != ROAR_CMD_OK ) { 195 195 if ( buf != NULL ) 196 free(buf);196 roar_mm_free(buf); 197 197 return NULL; 198 198 } … … 228 228 if ( res == NULL ) { 229 229 if ( buf != NULL ) 230 free(buf);230 roar_mm_free(buf); 231 231 return NULL; 232 232 } … … 243 243 244 244 if ( buf != NULL ) 245 free(buf);245 roar_mm_free(buf); 246 246 return res; 247 247 } -
libroar/meta.c
r5270 r5295 507 507 return -1; 508 508 509 if ( (c = malloc(((unsigned) m.data[1]) + 1)) == NULL )509 if ( (c = roar_mm_malloc(((unsigned) m.data[1]) + 1)) == NULL ) 510 510 return -1; 511 511 … … 555 555 int roar_meta_free (struct roar_meta * meta) { 556 556 if ( meta->value ) 557 free(meta->value);557 roar_mm_free(meta->value); 558 558 559 559 return 0; -
libroar/proto.c
r5270 r5295 272 272 } 273 273 274 if ( (*data = malloc(mes->datalen)) == NULL ) {274 if ( (*data = roar_mm_malloc(mes->datalen)) == NULL ) { 275 275 roar_err_set(ROAR_ERROR_NOMEM); 276 276 return -1; … … 330 330 331 331 if ( data != NULL ) 332 free(*data);332 roar_mm_free(*data); 333 333 334 334 roar_vio_sync(vio); // we need to do this becasue of ssl/compressed links -
libroar/serverinfo.c
r5279 r5295 66 66 67 67 if ( data != NULL ) 68 free(data);68 roar_mm_free(data); 69 69 70 70 return ret; … … 113 113 return -1; 114 114 115 mesdata = malloc(needlen);115 mesdata = roar_mm_malloc(needlen); 116 116 117 117 if ( mesdata == NULL ) -
libroar/vs.c
r5289 r5295 213 213 214 214 if ( data != NULL ) 215 free(data);215 roar_mm_free(data); 216 216 217 217 return 0; -
roard/clients.c
r5275 r5295 654 654 655 655 if ( data != NULL ) 656 free(data);656 roar_mm_free(data); 657 657 658 658 ROAR_DBG("clients_check(id=%i) = %i", id, rv); -
roard/meta.c
r5162 r5295 41 41 s->meta[i].type = ROAR_META_TYPE_NONE; 42 42 if ( s->meta[i].value != NULL ) 43 free(s->meta[i].value);43 roar_mm_free(s->meta[i].value); 44 44 s->meta[i].value = NULL; 45 45 } … … 164 164 s->meta[i].type = ROAR_META_TYPE_NONE; 165 165 if ( s->meta[i].value ) 166 free(s->meta[i].value);166 roar_mm_free(s->meta[i].value); 167 167 s->meta[i].value = NULL; 168 168 s->meta[i].key[0] = 0; -
roard/output.c
r5242 r5295 201 201 #ifdef ROAR_DRIVER_CODEC 202 202 if ( opts == NULL ) { 203 opts = to_free = strdup("codec=" ROAR_DRIVER_CODEC);203 opts = to_free = roar_mm_strdup("codec=" ROAR_DRIVER_CODEC); 204 204 } 205 205 #endif … … 371 371 #ifdef ROAR_DRIVER_CODEC 372 372 if ( to_free != NULL ) 373 free(to_free);373 roar_mm_free(to_free); 374 374 #endif 375 375 return -1; … … 439 439 #ifdef ROAR_DRIVER_CODEC 440 440 if ( to_free != NULL ) 441 free(to_free);441 roar_mm_free(to_free); 442 442 #endif 443 443 -
roard/req.c
r5279 r5295 59 59 60 60 if ( *data != NULL ) 61 free(*data);62 63 *data = malloc(len);61 roar_mm_free(*data); 62 63 *data = roar_mm_malloc(len); 64 64 65 65 ROAR_DBG("_dataspace(mes=%p, data=%p, flags=%p, len=%llu): *data=%p", mes, data, flags, (long long unsigned int)len, *data);
Note: See TracChangeset
for help on using the changeset viewer.