mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
core: Assert return value of pa_shared_set/_remove() in dbus-shared
it must succeed, or we are leaking memory Coverity ID: #1380674, #1380673 Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
This commit is contained in:
parent
0ced45265c
commit
976f7e9a61
1 changed files with 2 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ static pa_dbus_connection* dbus_connection_new(pa_core *c, pa_dbus_wrap_connecti
|
|||
pconn->property_name = name;
|
||||
pconn->connection = conn;
|
||||
|
||||
pa_shared_set(c, name, pconn);
|
||||
pa_assert_se(pa_shared_set(c, name, pconn) >= 0);
|
||||
|
||||
return pconn;
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ void pa_dbus_connection_unref(pa_dbus_connection *c) {
|
|||
|
||||
pa_dbus_wrap_connection_free(c->connection);
|
||||
|
||||
pa_shared_remove(c->core, c->property_name);
|
||||
pa_assert_se(pa_shared_remove(c->core, c->property_name) >= 0);
|
||||
pa_xfree(c);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue