mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
Handle allocation failures in security code
Note that such errors are generally going to be fatal
This commit is contained in:
parent
31b002b6d5
commit
7784f1a905
3 changed files with 24 additions and 2 deletions
|
|
@ -50,6 +50,9 @@ static struct feature_policy *get_policy(const char *name) {
|
|||
}
|
||||
if (!policy) {
|
||||
policy = alloc_feature_policy(name);
|
||||
if (!policy) {
|
||||
sway_abort("Unable to allocate security policy");
|
||||
}
|
||||
list_add(config->feature_policies, policy);
|
||||
}
|
||||
return policy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue