summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/perl/perl-common.c5
-rw-r--r--src/perl/perl-core.c4
-rw-r--r--src/perl/perl-signals.c1
3 files changed, 7 insertions, 3 deletions
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c
index ef15b99a..1109dee6 100644
--- a/src/perl/perl-common.c
+++ b/src/perl/perl-common.c
@@ -561,12 +561,15 @@ void perl_common_stop(void)
{
g_hash_table_foreach(iobject_stashes, (GHFunc) free_iobject_hash, NULL);
g_hash_table_destroy(iobject_stashes);
+ iobject_stashes = NULL;
g_hash_table_foreach(plain_stashes, (GHFunc) g_free, NULL);
g_hash_table_destroy(plain_stashes);
+ plain_stashes = NULL;
g_slist_foreach(use_protocols, (GFunc) g_free, NULL);
- g_slist_free(use_protocols);
+ g_slist_free(use_protocols);
+ use_protocols = NULL;
signal_remove("chat protocol created", (SIGNAL_FUNC) perl_register_protocol);
signal_remove("chat protocol destroyed", (SIGNAL_FUNC) perl_unregister_protocol);
diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c
index cadc0c4b..b6fce2c1 100644
--- a/src/perl/perl-core.c
+++ b/src/perl/perl-core.c
@@ -94,14 +94,14 @@ void perl_scripts_init(void)
perl_parse(my_perl, xs_init, 3, args, NULL);
+ perl_common_start();
+
use_code = perl_get_use_list();
code = g_strdup_printf(irssi_core_code, use_code);
perl_eval_pv(code, TRUE);
g_free(code);
g_free(use_code);
-
- perl_common_start();
}
/* Destroy all perl scripts and deinitialize perl interpreter */
diff --git a/src/perl/perl-signals.c b/src/perl/perl-signals.c
index 0fc00b6f..9aa8d97a 100644
--- a/src/perl/perl-signals.c
+++ b/src/perl/perl-signals.c
@@ -435,6 +435,7 @@ void perl_signals_stop(void)
g_hash_table_foreach(signals[n],
(GHFunc) signal_destroy_hash, NULL);
g_hash_table_destroy(signals[n]);
+ signals[n] = NULL;
}
}