mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
Fix a NULL pointer access when sutting down esound/simple connections
If a connection is unlinked make sure the process_msg function doesn't crash when a message is received afterwards. Closes #463.
This commit is contained in:
parent
869341729f
commit
d09287d211
2 changed files with 6 additions and 0 deletions
|
|
@ -1290,6 +1290,9 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, int6
|
|||
connection *c = CONNECTION(o);
|
||||
connection_assert_ref(c);
|
||||
|
||||
if (!c->protocol)
|
||||
return -1;
|
||||
|
||||
switch (code) {
|
||||
case CONNECTION_MESSAGE_REQUEST_DATA:
|
||||
do_work(c);
|
||||
|
|
|
|||
|
|
@ -283,6 +283,9 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, int6
|
|||
connection *c = CONNECTION(o);
|
||||
connection_assert_ref(c);
|
||||
|
||||
if (!c->protocol)
|
||||
return -1;
|
||||
|
||||
switch (code) {
|
||||
case CONNECTION_MESSAGE_REQUEST_DATA:
|
||||
do_work(c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue