aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rio/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/rio/client.c')
-rw-r--r--src/cmd/rio/client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/rio/client.c b/src/cmd/rio/client.c
index 256261ca..d78be626 100644
--- a/src/cmd/rio/client.c
+++ b/src/cmd/rio/client.c
@@ -151,6 +151,11 @@ getclient(Window w, int create)
return 0;
c = (Client *)malloc(sizeof(Client));
+ if (!c){
+ fprintf(stderr, "rio: Failed to allocate memory\n");
+ exit(1);
+ }
+
memset(c, 0, sizeof(Client));
c->window = w;
/* c->parent will be set by the caller */