[Commits] perl_plugin.c 1.19.2.35 1.19.2.36
holger at claws-mail.org
holger at claws-mail.org
Sat Aug 11 00:16:49 CEST 2012
Update of /home/claws-mail/plugins/perl/src
In directory srv:/tmp/cvs-serv27211/src
Modified Files:
Tag: gtk2
perl_plugin.c
Log Message:
2012-08-10 [holger] 0.9.19cvs2
* src/perl_plugin.c
Cleanup
Index: perl_plugin.c
===================================================================
RCS file: /home/claws-mail/plugins/perl/src/perl_plugin.c,v
retrieving revision 1.19.2.35
retrieving revision 1.19.2.36
diff -u -d -r1.19.2.35 -r1.19.2.36
--- perl_plugin.c 9 Aug 2012 20:57:45 -0000 1.19.2.35
+++ perl_plugin.c 10 Aug 2012 22:16:47 -0000 1.19.2.36
@@ -141,6 +141,7 @@
_exit(1);
}
}
+ return 0;
}
@@ -170,6 +171,7 @@
break;
default:
g_warning("Perl Plugin: Wrong use of filter_log_write");
+ break;
}
}
}
@@ -2082,17 +2084,13 @@
gint plugin_init(gchar **error)
{
int argc;
- char *argv[1];
- char *env[1];
+ char **argv;
+ char **env;
int status = 0;
FILE *fp;
gchar *perlfilter;
gchar *rcpath;
- argc = 1;
- *argv = NULL;
- *env = NULL;
-
/* version check */
if(!check_plugin_version(MAKE_NUMERIC_VERSION(3,7,4,6),
VERSION_NUMERIC, "Perl", error))
@@ -2138,8 +2136,17 @@
fclose(fp);
g_free(perlfilter);
+ argc = 1;
+ argv = g_new0(char*, 1);
+ argv[0] = NULL;
+ env = g_new0(char*, 1);
+ env[0] = NULL;
+
+
/* Initialize Perl Interpreter */
- PERL_SYS_INIT3(&argc,&argv,&env);
+ PERL_SYS_INIT3(&argc, &argv, &env);
+ g_free(argv);
+ g_free(env);
if(my_perl == NULL)
status = perl_init();
if(status) {
More information about the Commits
mailing list