diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-12-15 18:10:29 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-12-15 19:01:41 -0500 |
commit | 7784f1a905cad5ad805195dcc3cba23ff206501c (patch) | |
tree | a40897217eb0a87cbacc56c100cc137ff70bd8fa /sway/commands.c | |
parent | Handle IPC server allocation failures (diff) | |
download | sway-7784f1a905cad5ad805195dcc3cba23ff206501c.tar.gz sway-7784f1a905cad5ad805195dcc3cba23ff206501c.tar.zst sway-7784f1a905cad5ad805195dcc3cba23ff206501c.zip |
Handle allocation failures in security code
Note that such errors are generally going to be fatal
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index 8d199467..c15cb00a 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -575,6 +575,9 @@ struct cmd_results *config_commands_command(char *exec) { | |||
575 | } | 575 | } |
576 | if (!policy) { | 576 | if (!policy) { |
577 | policy = alloc_command_policy(cmd); | 577 | policy = alloc_command_policy(cmd); |
578 | if (!policy) { | ||
579 | sway_abort("Unable to allocate security policy"); | ||
580 | } | ||
578 | list_add(config->command_policies, policy); | 581 | list_add(config->command_policies, policy); |
579 | } | 582 | } |
580 | policy->context = context; | 583 | policy->context = context; |