Ignore:
Timestamp:
Apr 21, 2016, 7:01:50 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
26a6af7
Parents:
ae5d58a
Message:

src/io/*.c: take a copy of const char* path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_wavread.c

    rae5d58a rb643a33  
    8787  }
    8888
    89   s->path = path;
     89  if (s->path) AUBIO_FREE(s->path);
     90  s->path = AUBIO_ARRAY(char_t, strnlen(path, PATH_MAX));
     91  strncpy(s->path, path, strnlen(path, PATH_MAX));
     92
    9093  s->samplerate = samplerate;
    9194  s->hop_size = hop_size;
     
    389392  if (s->short_output) AUBIO_FREE(s->short_output);
    390393  if (s->output) del_fmat(s->output);
     394  if (s->path) AUBIO_FREE(s->path);
    391395  AUBIO_FREE(s);
    392396}
Note: See TracChangeset for help on using the changeset viewer.