Changeset 7107ed9


Ignore:
Timestamp:
Dec 14, 2018, 2:59:14 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
Children:
0850e54
Parents:
6031419
Message:

[io] avoid crash when calling vorbis_close twice

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_vorbis.c

    r6031419 r7107ed9  
    272272  aubio_sink_vorbis_write(s);
    273273
    274   if (fclose(s->fid)) {
     274  if (s->fid && fclose(s->fid)) {
    275275    AUBIO_ERR("sink_vorbis: Error closing file %s (%s)\n",
    276276        s->path, strerror(errno));
    277277    return AUBIO_FAIL;
    278278  }
     279  s->fid = NULL;
    279280  return AUBIO_OK;
    280281}
Note: See TracChangeset for help on using the changeset viewer.