projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7fc8406
)
[source] always call del_aubio_source to clean-up
author
Paul Brossier
<piem@piem.org>
Sun, 16 Dec 2018 18:04:46 +0000
(19:04 +0100)
committer
Paul Brossier
<piem@piem.org>
Sun, 16 Dec 2018 18:04:46 +0000
(19:04 +0100)
src/io/source.c
patch
|
blob
|
history
diff --git
a/src/io/source.c
b/src/io/source.c
index
41581bf
..
6af6c3f
100644
(file)
--- a/
src/io/source.c
+++ b/
src/io/source.c
@@
-121,7
+121,7
@@
aubio_source_t * new_aubio_source(const char_t * uri, uint_t samplerate, uint_t
AUBIO_ERROR("source: failed creating with %s at %dHz with hop size %d"
" (no source built-in)\n", uri, samplerate, hop_size);
#endif
AUBIO_ERROR("source: failed creating with %s at %dHz with hop size %d"
" (no source built-in)\n", uri, samplerate, hop_size);
#endif
-
AUBIO_FREE
(s);
+
del_aubio_source
(s);
return NULL;
}
return NULL;
}
@@
-138,8
+138,8
@@
uint_t aubio_source_close(aubio_source_t * s) {
}
void del_aubio_source(aubio_source_t * s) {
}
void del_aubio_source(aubio_source_t * s) {
- if (
!s) return;
- s->s_del((void *)s->source);
+ if (
s->s_del && s->source)
+
s->s_del((void *)s->source);
AUBIO_FREE(s);
}
AUBIO_FREE(s);
}