changeset 11842:cdd941172951

[gaim-migrate @ 14133] plug a couple of leaks committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 26 Oct 2005 10:42:11 +0000
parents f91b4fedd8b5
children 6539e6aa8ae6
files plugins/perl/perl.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/perl/perl.c	Wed Oct 26 10:32:06 2005 +0000
+++ b/plugins/perl/perl.c	Wed Oct 26 10:42:11 2005 +0000
@@ -339,13 +339,17 @@
 			/*		page.					*/
 			/********************************************************/
 			if ((key = hv_fetch(plugin_info, "prefs_info", strlen("prefs_info"), 0))) {
+				char *tmp = g_strdup_printf("%s::%s", gps->package, SvPV(*key, len));
 				/* key now is the name of the Perl sub that will create a frame for us */
-				info->prefs_info = gaim_perl_plugin_pref(g_strdup_printf("%s::%s", gps->package, SvPV(*key, len)));
+				info->prefs_info = gaim_perl_plugin_pref(tmp);
+				g_free(tmp);
 			}
 			
 			if ((key = hv_fetch(plugin_info, "gtk_prefs_info", strlen("gtk_prefs_info"), 0))) {
+				char *tmp = g_strdup_printf("%s::%s", gps->package, SvPV(*key, len));
 				/* key now is the name of the Perl sub that will create a frame for us */
-				info->ui_info = gaim_perl_gtk_plugin_pref(g_strdup_printf("%s::%s", gps->package, SvPV(*key, len)));
+				info->ui_info = gaim_perl_gtk_plugin_pref(tmp);
+				g_free(tmp);
 			}
 
 			/********************************************************/