From 685ffd575151fec5cf7733a89129a7b44660fe3a Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Wed, 7 Jun 2017 23:18:45 +0300 Subject: [PATCH 1/1] fix wrong malloc size for ignore_error buffer This is supposed to be allocating the initial buffer which consists of 4 integers to store errno values to ignore. Also explicitly zero clear the buffer. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.c b/options.c index 2daa983e..864e7784 100644 --- a/options.c +++ b/options.c @@ -282,7 +282,7 @@ static int ignore_error_type(struct thread_data *td, int etype, char *str) } td->o.ignore_error_nr[etype] = 4; - error = malloc(4 * sizeof(struct bssplit)); + error = calloc(4, sizeof(int)); i = 0; while ((fname = strsep(&str, ":")) != NULL) { -- 2.25.1