aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-12-15 17:52:53 -0500
committerDrew DeVault <sir@cmpwn.com>2016-12-15 19:01:41 -0500
commitd75a747a3ddc99f258025a923de1cf4821bf3115 (patch)
tree5fba9582e3d8d71f7d41f420e249d78bc5b4bee8 /common
parent248df18c24d2a849de984b477ca3913ce7c72441 (diff)
downloadsway-d75a747a3ddc99f258025a923de1cf4821bf3115.tar.xz
Handle config-related allocation failures
Diffstat (limited to 'common')
-rw-r--r--common/list.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/list.c b/common/list.c
index d57234e3..dd864a9b 100644
--- a/common/list.c
+++ b/common/list.c
@@ -5,6 +5,9 @@
list_t *create_list(void) {
list_t *list = malloc(sizeof(list_t));
+ if (!list) {
+ return NULL;
+ }
list->capacity = 10;
list->length = 0;
list->items = malloc(sizeof(void*) * list->capacity);