mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 13:45:03 -05:00
move buflib_free invalid handle check to the function
allow buflib_free to check for invalid or already freed handles within the function -- remove all the invalid handle guards thru core_free Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e
This commit is contained in:
parent
9d3d925295
commit
12ef045fdf
18 changed files with 32 additions and 62 deletions
|
|
@ -839,8 +839,7 @@ int plugin_load(const char* plugin, const void* parameter)
|
|||
}
|
||||
lc_close(current_plugin_handle);
|
||||
current_plugin_handle = pfn_tsr_exit = NULL;
|
||||
if (plugin_buffer_handle > 0)
|
||||
plugin_buffer_handle = core_free(plugin_buffer_handle);
|
||||
plugin_buffer_handle = core_free(plugin_buffer_handle);
|
||||
}
|
||||
|
||||
splash(0, ID2P(LANG_WAIT));
|
||||
|
|
@ -921,8 +920,7 @@ int plugin_load(const char* plugin, const void* parameter)
|
|||
{ /* close handle if plugin is no tsr one */
|
||||
lc_close(current_plugin_handle);
|
||||
current_plugin_handle = NULL;
|
||||
if (plugin_buffer_handle > 0)
|
||||
plugin_buffer_handle = core_free(plugin_buffer_handle);
|
||||
plugin_buffer_handle = core_free(plugin_buffer_handle);
|
||||
}
|
||||
|
||||
talk_buffer_set_policy(TALK_BUFFER_DEFAULT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue