summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-01-14 15:08:01 +0100
committerSébastien Helleu <flashcode@flashtux.org>2018-01-14 21:47:18 +0100
commitec169f535d97fc0c431df1e1c7e4d3172ad08a78 (patch)
treeb5ae4d952386c8e55ce574ac36b1876a3b70e428 /src/plugins
parenteb0560812bd2f4ddb68353e7dc5427c60397463d (diff)
downloadweechat-ec169f535d97fc0c431df1e1c7e4d3172ad08a78.zip
core: reinitialize config file pointer to NULL after an error on section creation
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/alias/alias-config.c2
-rw-r--r--src/plugins/aspell/weechat-aspell-config.c5
-rw-r--r--src/plugins/buflist/buflist-config.c2
-rw-r--r--src/plugins/charset/charset.c3
-rw-r--r--src/plugins/exec/exec-config.c2
-rw-r--r--src/plugins/fifo/fifo-config.c1
-rw-r--r--src/plugins/fset/fset-config.c3
-rw-r--r--src/plugins/irc/irc-config.c8
-rw-r--r--src/plugins/logger/logger-config.c5
-rw-r--r--src/plugins/relay/relay-config.c5
-rw-r--r--src/plugins/script/script-config.c3
-rw-r--r--src/plugins/trigger/trigger-config.c3
-rw-r--r--src/plugins/xfer/xfer-config.c4
13 files changed, 46 insertions, 0 deletions
diff --git a/src/plugins/alias/alias-config.c b/src/plugins/alias/alias-config.c
index fb8a86631..479ac743e 100644
--- a/src/plugins/alias/alias-config.c
+++ b/src/plugins/alias/alias-config.c
@@ -386,6 +386,7 @@ alias_config_init ()
if (!ptr_section)
{
weechat_config_free (alias_config_file);
+ alias_config_file = NULL;
return 0;
}
alias_config_section_cmd = ptr_section;
@@ -402,6 +403,7 @@ alias_config_init ()
if (!ptr_section)
{
weechat_config_free (alias_config_file);
+ alias_config_file = NULL;
return 0;
}
alias_config_section_completion = ptr_section;
diff --git a/src/plugins/aspell/weechat-aspell-config.c b/src/plugins/aspell/weechat-aspell-config.c
index 602d22201..1899bb09b 100644
--- a/src/plugins/aspell/weechat-aspell-config.c
+++ b/src/plugins/aspell/weechat-aspell-config.c
@@ -450,6 +450,7 @@ weechat_aspell_config_init ()
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
+ weechat_aspell_config_file = NULL;
return 0;
}
@@ -493,6 +494,7 @@ weechat_aspell_config_init ()
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
+ weechat_aspell_config_file = NULL;
return 0;
}
@@ -568,6 +570,7 @@ weechat_aspell_config_init ()
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
+ weechat_aspell_config_file = NULL;
return 0;
}
@@ -585,6 +588,7 @@ weechat_aspell_config_init ()
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
+ weechat_aspell_config_file = NULL;
return 0;
}
@@ -619,6 +623,7 @@ weechat_aspell_config_init ()
if (!ptr_section)
{
weechat_config_free (weechat_aspell_config_file);
+ weechat_aspell_config_file = NULL;
return 0;
}
diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c
index 004c4b9fd..f71603f4c 100644
--- a/src/plugins/buflist/buflist-config.c
+++ b/src/plugins/buflist/buflist-config.c
@@ -401,6 +401,7 @@ buflist_config_init ()
if (!ptr_section)
{
weechat_config_free (buflist_config_file);
+ buflist_config_file = NULL;
return 0;
}
@@ -532,6 +533,7 @@ buflist_config_init ()
if (!ptr_section)
{
weechat_config_free (buflist_config_file);
+ buflist_config_file = NULL;
return 0;
}
diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c
index 5de3f99fb..dd5e1779a 100644
--- a/src/plugins/charset/charset.c
+++ b/src/plugins/charset/charset.c
@@ -216,6 +216,7 @@ charset_config_init ()
if (!ptr_section)
{
weechat_config_free (charset_config_file);
+ charset_config_file = NULL;
return 0;
}
@@ -252,6 +253,7 @@ charset_config_init ()
if (!ptr_section)
{
weechat_config_free (charset_config_file);
+ charset_config_file = NULL;
return 0;
}
@@ -268,6 +270,7 @@ charset_config_init ()
if (!ptr_section)
{
weechat_config_free (charset_config_file);
+ charset_config_file = NULL;
return 0;
}
diff --git a/src/plugins/exec/exec-config.c b/src/plugins/exec/exec-config.c
index cb30638ff..43693aa47 100644
--- a/src/plugins/exec/exec-config.c
+++ b/src/plugins/exec/exec-config.c
@@ -109,6 +109,7 @@ exec_config_init ()
if (!ptr_section)
{
weechat_config_free (exec_config_file);
+ exec_config_file = NULL;
return 0;
}
@@ -141,6 +142,7 @@ exec_config_init ()
if (!ptr_section)
{
weechat_config_free (exec_config_file);
+ exec_config_file = NULL;
return 0;
}
diff --git a/src/plugins/fifo/fifo-config.c b/src/plugins/fifo/fifo-config.c
index 1bb12729d..e08435c75 100644
--- a/src/plugins/fifo/fifo-config.c
+++ b/src/plugins/fifo/fifo-config.c
@@ -103,6 +103,7 @@ fifo_config_init ()
if (!ptr_section)
{
weechat_config_free (fifo_config_file);
+ fifo_config_file = NULL;
return 0;
}
diff --git a/src/plugins/fset/fset-config.c b/src/plugins/fset/fset-config.c
index 264f53666..2796e8383 100644
--- a/src/plugins/fset/fset-config.c
+++ b/src/plugins/fset/fset-config.c
@@ -325,6 +325,7 @@ fset_config_init ()
if (!ptr_section)
{
weechat_config_free (fset_config_file);
+ fset_config_file = NULL;
return 0;
}
@@ -451,6 +452,7 @@ fset_config_init ()
if (!ptr_section)
{
weechat_config_free (fset_config_file);
+ fset_config_file = NULL;
return 0;
}
@@ -534,6 +536,7 @@ fset_config_init ()
if (!ptr_section)
{
weechat_config_free (fset_config_file);
+ fset_config_file = NULL;
return 0;
}
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 5a9f1ad95..ac0c53440 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -2560,6 +2560,7 @@ irc_config_init ()
if (!ptr_section)
{
weechat_config_free (irc_config_file);
+ irc_config_file = NULL;
return 0;
}
@@ -3019,6 +3020,7 @@ irc_config_init ()
if (!ptr_section)
{
weechat_config_free (irc_config_file);
+ irc_config_file = NULL;
return 0;
}
@@ -3148,6 +3150,7 @@ irc_config_init ()
if (!ptr_section)
{
weechat_config_free (irc_config_file);
+ irc_config_file = NULL;
return 0;
}
@@ -3293,6 +3296,7 @@ irc_config_init ()
if (!ptr_section)
{
weechat_config_free (irc_config_file);
+ irc_config_file = NULL;
return 0;
}
irc_config_section_msgbuffer = ptr_section;
@@ -3309,6 +3313,7 @@ irc_config_init ()
if (!ptr_section)
{
weechat_config_free (irc_config_file);
+ irc_config_file = NULL;
return 0;
}
irc_config_section_ctcp = ptr_section;
@@ -3325,6 +3330,7 @@ irc_config_init ()
if (!ptr_section)
{
weechat_config_free (irc_config_file);
+ irc_config_file = NULL;
return 0;
}
@@ -3340,6 +3346,7 @@ irc_config_init ()
if (!ptr_section)
{
weechat_config_free (irc_config_file);
+ irc_config_file = NULL;
return 0;
}
irc_config_section_server_default = ptr_section;
@@ -3358,6 +3365,7 @@ irc_config_init ()
if (!ptr_section)
{
weechat_config_free (irc_config_file);
+ irc_config_file = NULL;
return 0;
}
irc_config_section_server = ptr_section;
diff --git a/src/plugins/logger/logger-config.c b/src/plugins/logger/logger-config.c
index 4aa124e15..2c866d37a 100644
--- a/src/plugins/logger/logger-config.c
+++ b/src/plugins/logger/logger-config.c
@@ -388,6 +388,7 @@ logger_config_init ()
if (!ptr_section)
{
weechat_config_free (logger_config_file);
+ logger_config_file = NULL;
return 0;
}
@@ -420,6 +421,7 @@ logger_config_init ()
if (!ptr_section)
{
weechat_config_free (logger_config_file);
+ logger_config_file = NULL;
return 0;
}
@@ -447,6 +449,7 @@ logger_config_init ()
if (!ptr_section)
{
weechat_config_free (logger_config_file);
+ logger_config_file = NULL;
return 0;
}
@@ -547,6 +550,7 @@ logger_config_init ()
if (!ptr_section)
{
weechat_config_free (logger_config_file);
+ logger_config_file = NULL;
return 0;
}
@@ -564,6 +568,7 @@ logger_config_init ()
if (!ptr_section)
{
weechat_config_free (logger_config_file);
+ logger_config_file = NULL;
return 0;
}
diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c
index 2751910ca..27fa0974c 100644
--- a/src/plugins/relay/relay-config.c
+++ b/src/plugins/relay/relay-config.c
@@ -635,6 +635,7 @@ relay_config_init ()
if (!ptr_section)
{
weechat_config_free (relay_config_file);
+ relay_config_file = NULL;
return 0;
}
@@ -663,6 +664,7 @@ relay_config_init ()
if (!ptr_section)
{
weechat_config_free (relay_config_file);
+ relay_config_file = NULL;
return 0;
}
@@ -748,6 +750,7 @@ relay_config_init ()
if (!ptr_section)
{
weechat_config_free (relay_config_file);
+ relay_config_file = NULL;
return 0;
}
@@ -862,6 +865,7 @@ relay_config_init ()
if (!ptr_section)
{
weechat_config_free (relay_config_file);
+ relay_config_file = NULL;
return 0;
}
@@ -925,6 +929,7 @@ relay_config_init ()
if (!ptr_section)
{
weechat_config_free (relay_config_file);
+ relay_config_file = NULL;
return 0;
}
diff --git a/src/plugins/script/script-config.c b/src/plugins/script/script-config.c
index 1457e3dbf..b17a93cbb 100644
--- a/src/plugins/script/script-config.c
+++ b/src/plugins/script/script-config.c
@@ -398,6 +398,7 @@ script_config_init ()
if (!ptr_section)
{
weechat_config_free (script_config_file);
+ script_config_file = NULL;
return 0;
}
@@ -489,6 +490,7 @@ script_config_init ()
if (!ptr_section)
{
weechat_config_free (script_config_file);
+ script_config_file = NULL;
return 0;
}
@@ -712,6 +714,7 @@ script_config_init ()
if (!ptr_section)
{
weechat_config_free (script_config_file);
+ script_config_file = NULL;
return 0;
}
diff --git a/src/plugins/trigger/trigger-config.c b/src/plugins/trigger/trigger-config.c
index c0a4bead8..8edd61b79 100644
--- a/src/plugins/trigger/trigger-config.c
+++ b/src/plugins/trigger/trigger-config.c
@@ -661,6 +661,7 @@ trigger_config_init ()
if (!ptr_section)
{
weechat_config_free (trigger_config_file);
+ trigger_config_file = NULL;
return 0;
}
@@ -690,6 +691,7 @@ trigger_config_init ()
if (!ptr_section)
{
weechat_config_free (trigger_config_file);
+ trigger_config_file = NULL;
return 0;
}
@@ -761,6 +763,7 @@ trigger_config_init ()
if (!ptr_section)
{
weechat_config_free (trigger_config_file);
+ trigger_config_file = NULL;
return 0;
}
diff --git a/src/plugins/xfer/xfer-config.c b/src/plugins/xfer/xfer-config.c
index e7feb2d37..5d037c94b 100644
--- a/src/plugins/xfer/xfer-config.c
+++ b/src/plugins/xfer/xfer-config.c
@@ -126,6 +126,7 @@ xfer_config_init ()
if (!ptr_section)
{
weechat_config_free (xfer_config_file);
+ xfer_config_file = NULL;
return 0;
}
@@ -162,6 +163,7 @@ xfer_config_init ()
if (!ptr_section)
{
weechat_config_free (xfer_config_file);
+ xfer_config_file = NULL;
return 0;
}
@@ -248,6 +250,7 @@ xfer_config_init ()
if (!ptr_section)
{
weechat_config_free (xfer_config_file);
+ xfer_config_file = NULL;
return 0;
}
@@ -304,6 +307,7 @@ xfer_config_init ()
if (!ptr_section)
{
weechat_config_free (xfer_config_file);
+ xfer_config_file = NULL;
return 0;
}