[sink_wavwrite] check fseek and fwrite return values
[aubio.git] / src / io / source_sndfile.c
index eea2ffc..23cd73c 100644 (file)
@@ -86,7 +86,6 @@ aubio_source_sndfile_t * new_aubio_source_sndfile(const char_t * path, uint_t sa
   s->hop_size = hop_size;
   s->channels = 1;
 
-  if (s->path) AUBIO_FREE(s->path);
   s->path = AUBIO_ARRAY(char_t, strnlen(path, PATH_MAX) + 1);
   strncpy(s->path, path, strnlen(path, PATH_MAX) + 1);
 
@@ -331,7 +330,7 @@ uint_t aubio_source_sndfile_close (aubio_source_sndfile_t *s) {
 }
 
 void del_aubio_source_sndfile(aubio_source_sndfile_t * s){
-  if (!s) return;
+  AUBIO_ASSERT(s);
   aubio_source_sndfile_close(s);
 #ifdef HAVE_SAMPLERATE
   if (s->resamplers != NULL) {