mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
client: Use pa_xnew0 when creating a client
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
772d655de6
commit
0284363aa1
1 changed files with 1 additions and 5 deletions
|
|
@ -60,7 +60,7 @@ pa_client *pa_client_new(pa_core *core, pa_client_new_data *data) {
|
|||
if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_CLIENT_NEW], data) < 0)
|
||||
return NULL;
|
||||
|
||||
c = pa_xnew(pa_client, 1);
|
||||
c = pa_xnew0(pa_client, 1);
|
||||
c->core = core;
|
||||
c->proplist = pa_proplist_copy(data->proplist);
|
||||
c->driver = pa_xstrdup(pa_path_get_filename(data->driver));
|
||||
|
|
@ -69,10 +69,6 @@ pa_client *pa_client_new(pa_core *core, pa_client_new_data *data) {
|
|||
c->sink_inputs = pa_idxset_new(NULL, NULL);
|
||||
c->source_outputs = pa_idxset_new(NULL, NULL);
|
||||
|
||||
c->userdata = NULL;
|
||||
c->kill = NULL;
|
||||
c->send_event = NULL;
|
||||
|
||||
pa_assert_se(pa_idxset_put(core->clients, c, &c->index) >= 0);
|
||||
|
||||
pa_log_info("Created %u \"%s\"", c->index, pa_strnull(pa_proplist_gets(c->proplist, PA_PROP_APPLICATION_NAME)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue