X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=sidebyside;f=iolog.c;h=cfcab2712d1026e20a71c27dcc2428a1a76923f2;hb=e75cc8f3a296fe5910eee9b7f25cc8cb524b4518;hp=ef8b84145db0e14f808bdb53539184011b44975b;hpb=892ea9bdd2b794ffacb2975d0b1db3e4f319f153;p=fio.git diff --git a/iolog.c b/iolog.c index ef8b8414..cfcab271 100644 --- a/iolog.c +++ b/iolog.c @@ -539,9 +539,9 @@ int init_iolog(struct thread_data *td) void setup_log(struct io_log **log, struct log_params *p, const char *filename) { - struct io_log *l = malloc(sizeof(*l)); + struct io_log *l; - memset(l, 0, sizeof(*l)); + l = calloc(1, sizeof(*l)); l->nr_samples = 0; l->max_samples = 1024; l->log_type = p->log_type;