aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin.c b/plugin.c
index d2fe95c..1f552f0 100644
--- a/plugin.c
+++ b/plugin.c
@@ -42,12 +42,12 @@ static int plugin_attach(char* path, char* file){
else{
return 0;
}
+ free(lib);
plugin_handle = realloc(plugin_handle, (plugins + 1) * sizeof(void*));
if(!plugin_handle){
fprintf(stderr, "Failed to allocate memory\n");
dlclose(handle);
- free(lib);
return 1;
}