Changeset d726526


Ignore:
Timestamp:
Dec 6, 2018, 11:40:48 AM (12 months ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/timestretch, master
Children:
ed80243
Parents:
f19db54
Message:

[tests] prevent crash in test-awhitening, fix memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/src/spectral/test-awhitening.c

    rf19db54 rd726526  
    4242
    4343  aubio_pvoc_t *pv = new_aubio_pvoc(win_size, hop_size);
     44  if (!pv) { err = 1; goto beach_pvoc; }
    4445
    4546  aubio_spectral_whitening_t *awhitening =
    4647    new_aubio_spectral_whitening (win_size, hop_size, samplerate);
     48  if (!awhitening) { err = 1; goto beach_awhitening; }
    4749
    4850  aubio_spectral_whitening_set_relax_time(awhitening, 20.);
     
    7274      source_path, sink_path);
    7375
     76  del_aubio_spectral_whitening(awhitening);
     77beach_awhitening:
     78  del_aubio_pvoc(pv);
     79beach_pvoc:
    7480  del_aubio_sink(o);
    7581beach_sink:
     
    7783beach_source:
    7884  del_fvec(vec);
     85  del_fvec(out);
     86  del_fvec(scale);
     87  del_cvec(fftgrain);
    7988beach_fvec:
    8089  return err;
Note: See TracChangeset for help on using the changeset viewer.