diff options
author | Drew DeVault <[email protected]> | 2016-12-15 18:26:53 -0500 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2016-12-15 19:01:41 -0500 |
commit | 10c8b73075fa0dd5512cc14be7240ec47f68dece (patch) | |
tree | e8835ef640d1d21ce0f36a5b1bcee726d926e55e /sway/config.c | |
parent | a2b914965686bb4352b8ebc4a46d898f5a793647 (diff) |
Handle calloc failures
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c index b86bacdb..4164cefa 100644 --- a/sway/config.c +++ b/sway/config.c @@ -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) { |