mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pw-cli: avoid NULL deref
info can be NULL so use the update instead.
This commit is contained in:
parent
a18d495b59
commit
dcad1243a8
1 changed files with 3 additions and 3 deletions
|
|
@ -1031,7 +1031,7 @@ static void session_event_info(void *data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pd->global == NULL)
|
if (pd->global == NULL)
|
||||||
pd->global = pw_map_lookup(&rd->globals, info->id);
|
pd->global = pw_map_lookup(&rd->globals, update->id);
|
||||||
if (pd->global && pd->global->info_pending) {
|
if (pd->global && pd->global->info_pending) {
|
||||||
info_session(pd);
|
info_session(pd);
|
||||||
pd->global->info_pending = false;
|
pd->global->info_pending = false;
|
||||||
|
|
@ -1087,7 +1087,7 @@ static void endpoint_event_info(void *data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pd->global == NULL)
|
if (pd->global == NULL)
|
||||||
pd->global = pw_map_lookup(&rd->globals, info->id);
|
pd->global = pw_map_lookup(&rd->globals, update->id);
|
||||||
if (pd->global && pd->global->info_pending) {
|
if (pd->global && pd->global->info_pending) {
|
||||||
info_endpoint(pd);
|
info_endpoint(pd);
|
||||||
pd->global->info_pending = false;
|
pd->global->info_pending = false;
|
||||||
|
|
@ -1136,7 +1136,7 @@ static void endpoint_stream_event_info(void *data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pd->global == NULL)
|
if (pd->global == NULL)
|
||||||
pd->global = pw_map_lookup(&rd->globals, info->id);
|
pd->global = pw_map_lookup(&rd->globals, update->id);
|
||||||
if (pd->global && pd->global->info_pending) {
|
if (pd->global && pd->global->info_pending) {
|
||||||
info_endpoint_stream(pd);
|
info_endpoint_stream(pd);
|
||||||
pd->global->info_pending = false;
|
pd->global->info_pending = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue