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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user