summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-05-26 22:57:21 +0200
committerThomas Martitz <kugel@rockbox.org>2012-05-26 22:57:21 +0200
commitd523fd6e6407137ce12395a49223ba41009357ba (patch)
tree8b85d11db596dc10b53be946ad1828856fd43125 /apps/plugins/lib
parent3f365fc06b67f8842b2e155349110f7c5659768d (diff)
load_code/overlay: Don't close plugin handle before calling the plugin.
Doesnt fix an actual bug because closing a handle is a no-op on all native targets and others dont use overlay. Change-Id: Ie55e3fd4abd08b174d86ca25aed54a970dddbebd
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/overlay.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/plugins/lib/overlay.c b/apps/plugins/lib/overlay.c
index 21002ad43f..0ecc1bf3e7 100644
--- a/apps/plugins/lib/overlay.c
+++ b/apps/plugins/lib/overlay.c
@@ -52,6 +52,7 @@ enum plugin_status run_overlay(const void* parameter,
void *handle;
struct plugin_header *p_hdr;
struct lc_header *hdr;
+ enum plugin_status retval = PLUGIN_ERROR;
audiobuf = rb->plugin_get_audio_buffer(&audiobuf_size);
if (!audiobuf)
@@ -90,13 +91,11 @@ enum plugin_status run_overlay(const void* parameter,
goto error_close;
}
- rb->lc_close(handle);
-
*(p_hdr->api) = rb;
- return p_hdr->entry_point(parameter);
-
+ retval = p_hdr->entry_point(parameter);
+ /* fall through */
error_close:
rb->lc_close(handle);
error:
- return PLUGIN_ERROR;
+ return retval;
}