card: Use pa_xmalloc0 when creating card profiles

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2015-05-05 17:01:07 +02:00 committed by Tanu Kaskinen
parent 12a93495b9
commit 336a2cc6f0

View file

@ -41,14 +41,9 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
pa_assert(name);
c = pa_xmalloc(PA_ALIGN(sizeof(pa_card_profile)) + extra);
c->card = NULL;
c = pa_xmalloc0(PA_ALIGN(sizeof(pa_card_profile)) + extra);
c->name = pa_xstrdup(name);
c->description = pa_xstrdup(description);
c->priority = 0;
c->n_sinks = c->n_sources = 0;
c->max_sink_channels = c->max_source_channels = 0;
c->available = PA_AVAILABLE_UNKNOWN;
return c;