mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-07 06:14:13 +01:00
- Replaced all free() with wfree() where appropriate
- Fixed some memory leaks
This commit is contained in:
10
src/plugin.c
10
src/plugin.c
@@ -77,7 +77,7 @@ wPluginCreateFunction(int type, char *library_name,
|
||||
function->handle = dlopen(library_name, RTLD_LAZY);
|
||||
if (!function->handle) {
|
||||
wwarning(_("library \"%s\" cound not be opened."), library_name);
|
||||
free(function);
|
||||
wfree(function);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ wPluginCreateFunction(int type, char *library_name,
|
||||
if (!function->proc.any) {
|
||||
wwarning(_("function \"%s\" not found in library \"%s\""), proc_name, library_name);
|
||||
dlclose(function->handle);
|
||||
free(function);
|
||||
wfree(function);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ wPluginCreateFunction(int type, char *library_name,
|
||||
wwarning(_("function \"%s\" not found in library \"%s\""), free_data_proc_name, library_name);
|
||||
/*
|
||||
dlclose(function->handle);
|
||||
free(function);
|
||||
wfree(function);
|
||||
return NULL;
|
||||
*/
|
||||
}
|
||||
@@ -128,11 +128,11 @@ wPluginDestroyFunction(WFunction *function)
|
||||
if (function->freeData) {
|
||||
function->freeData(&function->data);
|
||||
} else {
|
||||
free(function->data);
|
||||
wfree(function->data);
|
||||
}
|
||||
}
|
||||
if (function->arg) PLRelease(function->arg);
|
||||
free(function);
|
||||
wfree(function);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user