mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Handle calloc failures
This commit is contained in:
parent
a2b9149656
commit
10c8b73075
8 changed files with 39 additions and 2 deletions
|
|
@ -494,6 +494,9 @@ bool load_main_config(const char *file, bool is_active) {
|
|||
|
||||
struct sway_config *old_config = config;
|
||||
config = calloc(1, sizeof(struct sway_config));
|
||||
if (!config) {
|
||||
sway_abort("Unable to allocate config");
|
||||
}
|
||||
|
||||
config_defaults(config);
|
||||
if (is_active) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue