aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJan Düpmeier <j.duepmeier@googlemail.com>2017-11-29 19:30:35 +0100
committerJan Düpmeier <j.duepmeier@googlemail.com>2017-11-29 19:30:35 +0100
commit900924dbefc16d990b0e3d2f588bce95e6625c06 (patch)
treee9c923c8973eeb7301e8366d92519c313bce8f18
parentd608a46f807032d57bf093941fa61076793957bc (diff)
downloadmidimonster-900924dbefc16d990b0e3d2f588bce95e6625c06.tar.gz
midimonster-900924dbefc16d990b0e3d2f588bce95e6625c06.tar.bz2
midimonster-900924dbefc16d990b0e3d2f588bce95e6625c06.zip
fixing lib string leaks memory
-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;
}