From 56f064dce822a53ad668c38d1bb7b2b3025fe270 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 12 Feb 2017 18:20:40 +0100 Subject: Fix uninitialized sndfile structure --- plugins/eg-sampler.lv2/sampler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c index 95cb45e..3bd8b6c 100644 --- a/plugins/eg-sampler.lv2/sampler.c +++ b/plugins/eg-sampler.lv2/sampler.c @@ -110,7 +110,7 @@ load_sample(LV2_Log_Logger* logger, const char* path) lv2_log_trace(logger, "Loading %s\n", path); const size_t path_len = strlen(path); - Sample* const sample = (Sample*)malloc(sizeof(Sample)); + Sample* const sample = (Sample*)calloc(1, sizeof(Sample)); SF_INFO* const info = &sample->info; SNDFILE* const sndfile = sf_open(path, SFM_READ, info); float* data = NULL; -- cgit v1.2.1