1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

core: fix memory leak when config version is invalid or not supported

This commit is contained in:
Sébastien Helleu
2023-10-30 12:25:28 +01:00
parent 3c62ae482b
commit 02f26517f3
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -23,6 +23,7 @@ New features::
Bug fixes::
* core: fix memory leak when config version is invalid or not supported
* core: fix crash when "config_version" is present in a configuration file without a value
* core: display an error on startup if environment variable "HOME" is not set
* core: fix crash when a custom bar item name is already used by a default bar item (issue #2034)
+8
View File
@@ -3670,6 +3670,10 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
filename, line_number,
line);
config_file_backup (filename);
if (option)
free (option);
if (value)
free (value);
goto end_file;
}
else
@@ -3687,6 +3691,10 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
config_file->version_read,
config_file->version);
config_file_backup (filename);
if (option)
free (option);
if (value)
free (value);
goto end_file;
}
}