1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 14:56:39 +02:00

core: reinitialize config file pointer to NULL after an error on section creation

This commit is contained in:
Sébastien Helleu
2018-01-14 15:08:01 +01:00
parent eb0560812b
commit ec169f535d
15 changed files with 63 additions and 0 deletions
+15
View File
@@ -2426,6 +2426,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -2442,6 +2443,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -2496,6 +2498,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -3559,6 +3562,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -3573,6 +3577,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4133,6 +4138,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4249,6 +4255,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4302,6 +4309,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4318,6 +4326,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4365,6 +4374,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4419,6 +4429,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4436,6 +4447,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4451,6 +4463,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4468,6 +4481,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
@@ -4489,6 +4503,7 @@ config_weechat_init_options ()
if (!ptr_section)
{
config_file_free (weechat_config_file);
weechat_config_file = NULL;
return 0;
}
}
+2
View File
@@ -952,6 +952,7 @@ secure_init_options ()
if (!ptr_section)
{
config_file_free (secure_config_file);
secure_config_file = NULL;
return 0;
}
@@ -1006,6 +1007,7 @@ secure_init_options ()
if (!ptr_section)
{
config_file_free (secure_config_file);
secure_config_file = NULL;
return 0;
}
+2
View File
@@ -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;
@@ -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;
}
+2
View File
@@ -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;
}
+3
View File
@@ -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;
}
+2
View File
@@ -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;
}
+1
View File
@@ -103,6 +103,7 @@ fifo_config_init ()
if (!ptr_section)
{
weechat_config_free (fifo_config_file);
fifo_config_file = NULL;
return 0;
}
+3
View File
@@ -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;
}
+8
View File
@@ -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;
+5
View File
@@ -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;
}
+5
View File
@@ -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;
}
+3
View File
@@ -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;
}
+3
View File
@@ -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;
}
+4
View File
@@ -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;
}