Fix memory leak in bluetooth module
This commit is contained in:
parent
85e710d3d5
commit
15047fe667
@ -34,6 +34,12 @@ static void load_initial_device_states(GDBusConnection *dbus,
|
||||
dbus, "org.bluez", path, "org.freedesktop.DBus.Properties", "Get",
|
||||
g_variant_new_parsed("('org.bluez.Adapter1', 'Powered')"),
|
||||
(GVariantType *)"(v)", G_DBUS_CALL_FLAGS_NONE, -1, NULL, &err);
|
||||
if (err) {
|
||||
qtb_log("checking bluetooth adapter power state failed\n-> %s", err->message);
|
||||
g_error_free(err);
|
||||
err = NULL;
|
||||
qtb_die();
|
||||
}
|
||||
if (response) {
|
||||
GVariant *wrapper = g_variant_get_child_value(response, 0);
|
||||
GVariant *value = g_variant_get_child_value(wrapper, 0);
|
||||
|
Reference in New Issue
Block a user