diff --git a/media/libsydneyaudio/src/sydney_audio_waveapi.c b/media/libsydneyaudio/src/sydney_audio_waveapi.c --- a/media/libsydneyaudio/src/sydney_audio_waveapi.c +++ b/media/libsydneyaudio/src/sydney_audio_waveapi.c @@ -147,17 +147,17 @@ int sa_stream_create_pcm(sa_stream_t **s if (format != SA_PCM_FORMAT_S16_NE) { return SA_ERROR_NOT_SUPPORTED; } if (mode != SA_MODE_WRONLY) { return SA_ERROR_NOT_SUPPORTED; } - if ((_s = (sa_stream_t*)malloc(sizeof(sa_stream_t))) == NULL) { + if ((_s = (sa_stream_t*)calloc(1, sizeof(sa_stream_t))) == NULL) { return SA_ERROR_OOM; } _s->rwMode = mode; _s->format = format; _s->rate = rate; _s->channels = nchannels; _s->deviceName = DEFAULT_DEVICE_NAME;