Home
last modified time | relevance | path

Searched hist:"76 b2bc7d" (Results 1 – 1 of 1) sorted by relevance

/openbmc/dbus-sensors/src/
H A DNVMeBasicContext.cpp76b2bc7d Fri Feb 18 11:48:16 CST 2022 Ed Tanous <edtanous@google.com> Fix lifetime bug

Capturing a shared_ptr by reference does not keep it alive for the
lifetime of the callback, as was clearly the intent on this line. This
leads to use after free bugs.

Make the one character change to capture this RAII object by value, not
reference.

Tested: Don't have NVMe drives to test with at the moment, but this
should be trivial.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5c81f0bd287f3ea3e3a77f3589718201733be32f