Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1197a76b authored by Hsin-chen Chuang's avatar Hsin-chen Chuang
Browse files

floss: topshim: Fix pointers that point to dropped objects

In the following snippet, the lifetime of `u` doesn't extend to the
outside of the match scope, so `uuid_ptr` is actually pointing to a
dropped object which is the reason that the UUIDs registered with socket
profile are always wrong.

let uuid_ptr = match uuid {
    Some(u) => &u as *const Uuid,
    None => std::ptr::null(),
};

Bug: 247704030
Tag: #floss
Test: build.py --target test; also manual test with sdptool
Change-Id: I71e3b84feafe9497005d4d3bd4f735a7936daca1
parent d904e899
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment