Changeset 4014:2fee6bf2dc0c in roaraudio for roarclients/roarvorbis.c


Ignore:
Timestamp:
07/01/10 20:04:36 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

fixed some resurce leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarvorbis.c

    r3843 r4014  
    251251 if ( in == NULL ) { 
    252252  roar_disconnect(&con); 
     253  fclose(in); 
    253254  return 1; 
    254255 } 
     
    261262  fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n"); 
    262263  roar_disconnect(&con); 
     264  fclose(in); 
    263265  return 1; 
    264266 } 
     
    269271  if ( roar_vio_open_dstr(&vclt, vcltfile, &def, 1) == -1 ) { 
    270272   fprintf(stderr, "Error: can not open file: %s: %s\n", k, strerror(errno)); 
     273   fclose(in); 
    271274   return 1; 
    272275  } 
     
    280283 
    281284  if ( last_section != current_section ) 
    282    if ( update_stream(&con, &s, &vio, &vf, file, &info, vcltfile == NULL ? NULL : &vclt) == -1 ) 
     285   if ( update_stream(&con, &s, &vio, &vf, file, &info, vcltfile == NULL ? NULL : &vclt) == -1 ) { 
     286    fclose(in); 
    283287    return 1; 
     288   } 
    284289 
    285290  last_section = current_section; 
     
    306311 } 
    307312 
     313 fclose(in); 
     314 
    308315 return 0; 
    309316#endif 
Note: See TracChangeset for help on using the changeset viewer.