Skip to content
Browse files

Don't double-free on plugin unload if more than one plugin is loaded

  • Loading branch information...
1 parent 5fdd24c commit 8333f339e085afdf255982f85e93c1cce62d5eee @Vagabond committed Oct 14, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/plugins.c
View
6 src/plugins.c
@@ -107,15 +107,15 @@ void findandloadplugin(acetables *g_ape)
void free_all_plugins(acetables *g_ape)
{
- ace_plugins *prev;
+ ace_plugins *next;
while (g_ape->plugins != NULL) {
g_ape->plugins->unloader(g_ape);
// dlclose(g_ape->plugins->hPlug);
- prev = g_ape->plugins;
- g_ape->plugins = g_ape->plugins->next;
+ next = g_ape->plugins->next;
free(g_ape->plugins);
+ g_ape->plugins = next;
}
}

0 comments on commit 8333f33

Please sign in to comment.
Something went wrong with that request. Please try again.