summaryrefslogtreecommitdiff
path: root/plugins/shn/shn.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/shn/shn.c')
-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;