projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6031419
)
[io] avoid crash when calling vorbis_close twice
author
Paul Brossier
<piem@piem.org>
Fri, 14 Dec 2018 13:59:14 +0000
(14:59 +0100)
committer
Paul Brossier
<piem@piem.org>
Fri, 14 Dec 2018 13:59:14 +0000
(14:59 +0100)
src/io/sink_vorbis.c
patch
|
blob
|
history
diff --git
a/src/io/sink_vorbis.c
b/src/io/sink_vorbis.c
index
3205ad0
..
0b95557
100644
(file)
--- a/
src/io/sink_vorbis.c
+++ b/
src/io/sink_vorbis.c
@@
-271,11
+271,12
@@
uint_t aubio_sink_vorbis_close (aubio_sink_vorbis_t *s)
aubio_sink_vorbis_write(s);
- if (fclose(s->fid)) {
+ if (
s->fid &&
fclose(s->fid)) {
AUBIO_ERR("sink_vorbis: Error closing file %s (%s)\n",
s->path, strerror(errno));
return AUBIO_FAIL;
}
+ s->fid = NULL;
return AUBIO_OK;
}