mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-20 04:10:03 +01:00
m-modem-manager: Avoid memory allocations unpacking string types
Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
This commit is contained in:
parent
133b82e61a
commit
9e390f1121
1 changed files with 2 additions and 5 deletions
|
|
@ -166,7 +166,7 @@ on_voice_signal (GDBusProxy * iface,
|
||||||
g_object_get (wpmm->dbus, "connection", &conn, NULL);
|
g_object_get (wpmm->dbus, "connection", &conn, NULL);
|
||||||
|
|
||||||
if (!g_strcmp0 (signal, "CallAdded")) {
|
if (!g_strcmp0 (signal, "CallAdded")) {
|
||||||
g_variant_get (params, "(o)", &path);
|
g_variant_get (params, "(&o)", &path);
|
||||||
g_dbus_proxy_new (conn,
|
g_dbus_proxy_new (conn,
|
||||||
G_DBUS_PROXY_FLAGS_NONE,
|
G_DBUS_PROXY_FLAGS_NONE,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
@ -176,9 +176,8 @@ on_voice_signal (GDBusProxy * iface,
|
||||||
NULL,
|
NULL,
|
||||||
bind_call,
|
bind_call,
|
||||||
wpmm);
|
wpmm);
|
||||||
g_free (path);
|
|
||||||
} else if (!g_strcmp0 (signal, "CallDeleted")) {
|
} else if (!g_strcmp0 (signal, "CallDeleted")) {
|
||||||
g_variant_get (params, "(o)", &path);
|
g_variant_get (params, "(&o)", &path);
|
||||||
|
|
||||||
// The user shouldn't have hundreds of calls, so just linear search.
|
// The user shouldn't have hundreds of calls, so just linear search.
|
||||||
deleted = g_list_find_custom (wpmm->calls, path, match_call_path);
|
deleted = g_list_find_custom (wpmm->calls, path, match_call_path);
|
||||||
|
|
@ -186,8 +185,6 @@ on_voice_signal (GDBusProxy * iface,
|
||||||
g_object_unref (deleted->data);
|
g_object_unref (deleted->data);
|
||||||
wpmm->calls = g_list_delete_link (wpmm->calls, deleted);
|
wpmm->calls = g_list_delete_link (wpmm->calls, deleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (path);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue