summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-09-27 21:58:15 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-09-27 21:58:15 +0200
commitd8fab76cd658439503a5a1882aed975fcbf4f3d2 (patch)
tree4ff97e4f8f2f92b137f7994015342c891f296227
parentc0454289b2debaa01358c9710f2249c403facef3 (diff)
fixed crash in shn plugin when seeking backward
-rw-r--r--plugins/shn/shn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c
index 0cecfa7e..1d44f6e8 100644
--- a/plugins/shn/shn.c
+++ b/plugins/shn/shn.c
@@ -401,10 +401,6 @@ shn_free_decoder (shn_fileinfo_t *info) {
info->shnfile->decode_state->writefub = NULL;
}
}
- if (info->shnfile) {
- shn_unload(info->shnfile);
- info->shnfile = NULL;
- }
}
}
@@ -412,6 +408,10 @@ void
shn_free (DB_fileinfo_t *_info) {
shn_fileinfo_t *info = (shn_fileinfo_t *)_info;
shn_free_decoder (info);
+ if (info->shnfile) {
+ shn_unload(info->shnfile);
+ info->shnfile = NULL;
+ }
if (info->buffer) {
free(info->buffer);
info->buffer = NULL;