summaryrefslogtreecommitdiffstats
path: root/slock.c
diff options
context:
space:
mode:
Diffstat (limited to 'slock.c')
-rw-r--r--slock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/slock.c b/slock.c
index 5ae738c..6c3401f 100644
--- a/slock.c
+++ b/slock.c
@@ -229,7 +229,7 @@ lockscreen(Display *dpy, struct xrandr *rr, int screen)
XSetWindowAttributes wa;
Cursor invisible;
- if (dpy == NULL || screen < 0 || !(lock = malloc(sizeof(struct lock))))
+ if (dpy == NULL || screen < 0 || !(lock = calloc(1, sizeof(struct lock))))
return NULL;
lock->screen = screen;