mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Use pa_hashmap_remove_and_free() where appropriate
This commit is contained in:
parent
14e2553185
commit
eca082a93f
14 changed files with 29 additions and 84 deletions
|
|
@ -144,12 +144,10 @@ static void free_session(struct session *session) {
|
|||
}
|
||||
|
||||
static void remove_session(struct userdata *u, const char *id) {
|
||||
struct session *session;
|
||||
pa_assert(u);
|
||||
pa_assert(id);
|
||||
|
||||
if (!(session = pa_hashmap_remove(u->sessions, id)))
|
||||
return;
|
||||
|
||||
free_session(session);
|
||||
pa_hashmap_remove_and_free(u->sessions, id);
|
||||
}
|
||||
|
||||
static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, void *userdata) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue