malloc + memset -> zalloc
And for clients using the xmalloc helper, use xzalloc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/screenshooter.c b/src/screenshooter.c
index 2b37071..2414015 100644
--- a/src/screenshooter.c
+++ b/src/screenshooter.c
@@ -465,12 +465,11 @@
stride = output->current->width;
size = stride * 4 * output->current->height;
- recorder->frame = malloc(size);
+ recorder->frame = zalloc(size);
recorder->rect = malloc(size);
recorder->total = 0;
recorder->count = 0;
recorder->output = output;
- memset(recorder->frame, 0, size);
if (do_yflip)
recorder->tmpbuf = NULL;