summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cairo.c2
-rw-r--r--group.c4
-rw-r--r--tab.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/cairo.c b/cairo.c
index da59146..342ab11 100644
--- a/cairo.c
+++ b/cairo.c
@@ -98,6 +98,8 @@ groupCreateCairoLayer (CompScreen *s,
layer = malloc (sizeof (GroupCairoLayer));
+ if (!layer)
+ return NULL;
layer->surface = NULL;
layer->cairo = NULL;
diff --git a/group.c b/group.c
index 8ffd302..e946cd4 100644
--- a/group.c
+++ b/group.c
@@ -639,8 +639,12 @@ groupAddWindowToGroup (CompWindow *w,
{
/* create new group */
GroupSelection *g = malloc (sizeof (GroupSelection));
+ if (!g)
+ return;
g->windows = malloc (sizeof (CompWindow *));
+ if (!g->windows)
+ return;
g->windows[0] = w;
g->screen = w->screen;
diff --git a/tab.c b/tab.c
index b7076ef..27d0087 100644
--- a/tab.c
+++ b/tab.c
@@ -2175,6 +2175,9 @@ void groupCreateSlot (GroupSelection *group,
return;
slot = malloc (sizeof (GroupTabBarSlot));
+ if (!slot)
+ return;
+
slot->window = w;
slot->region = XCreateRegion ();