mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 10:13:12 +02:00
core: fix memory leak when config version is invalid or not supported
This commit is contained in:
@@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele
|
||||
|
||||
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
|
||||
* ruby: fix use of NULL variable when displaying exception
|
||||
|
||||
@@ -3569,6 +3569,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
|
||||
@@ -3586,6 +3590,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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user