aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-02-12 18:20:40 +0100
committerDavid Robillard <d@drobilla.net>2017-02-12 18:20:40 +0100
commit56f064dce822a53ad668c38d1bb7b2b3025fe270 (patch)
treef533da8f5339191d2e64ba24ac954e7e886a31ac
parentf8fdd7a48d12465d2ef8153d25337593c88687e3 (diff)
downloadlv2-56f064dce822a53ad668c38d1bb7b2b3025fe270.tar.xz
Fix uninitialized sndfile structure
-rw-r--r--plugins/eg-sampler.lv2/sampler.c2
1 files changed, 1 insertions, 1 deletions
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;