Tue, 29 Aug 2000 18:24:26 +0000
[gaim-migrate @ 797]
plugging plugin leaks.
| src/plugins.c | file | annotate | diff | comparison | revisions |
--- a/src/plugins.c Tue Aug 29 06:02:43 2000 +0000 +++ b/src/plugins.c Tue Aug 29 18:24:26 2000 +0000 @@ -166,6 +166,7 @@ g_snprintf(buf, BUF_LEN - 1, "%s/%s", getenv("HOME"), PLUGIN_DIR); plug->filename = g_malloc(strlen(buf) + strlen(filename) + 1); sprintf(plug->filename, "%s%s", buf, filename); + g_free(buf); } else plug->filename = g_strdup(filename); sprintf(debug_buff, "Loading %s\n", filename); @@ -177,6 +178,7 @@ if (!plug->handle) { error = (char *)dlerror(); do_error_dialog(error, _("Plugin Error")); + g_free(plug->filename); g_free(plug); return; } @@ -185,6 +187,7 @@ if ((error = (char *)dlerror()) != NULL) { do_error_dialog(error, _("Plugin Error")); dlclose(plug->handle); + g_free(plug->filename); g_free(plug); return; } @@ -217,6 +220,7 @@ do_error_dialog(plugin_error, _("Plugin Error")); } dlclose(plug->handle); + g_free(plug->filename); g_free(plug); return; }