Changeset be63940


Ignore:
Timestamp:
Dec 12, 2018, 3:27:57 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
Children:
7e93013
Parents:
4b9481f9
Message:

[io] avoid memory leak in sink_vorbis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_vorbis.c

    r4b9481f9 rbe63940  
    6363  s->path = AUBIO_ARRAY(char_t, strnlen(uri, PATH_MAX) + 1);
    6464  strncpy(s->path, uri, strnlen(uri, PATH_MAX) + 1);
    65   s->path[PATH_MAX - 1] = '\0';
     65  s->path[strnlen(uri, PATH_MAX)] = '\0';
    6666
    6767  s->channels = 0;
     
    9393  vorbis_info_clear(&s->vi);
    9494
     95  if (s->path) AUBIO_FREE(s->path);
    9596  AUBIO_FREE(s);
    9697}
Note: See TracChangeset for help on using the changeset viewer.