mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
card: Use pa_xmalloc0 when creating card profiles
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
12a93495b9
commit
336a2cc6f0
1 changed files with 1 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue