Skip to content
Commit 3283cabb authored by Findlay Feng's avatar Findlay Feng Committed by Anas Nashif
Browse files

bluetooth: Fix an undefined behavior



The original creates a pointer to a compiler-generated temporary that is
destroyed when the scope is exited. The pointer is stored in a structure
defined in an enclosing scope and is invalid by the point it's used.

The fix holds the structure in a variable with the same lifetime as
the pointer.

Signed-off-by: default avatarFindlay Feng <i@fengch.me>
parent 2fd43e46
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment