mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilibc] Fix AnalogTriggerOutput memory leak reported by asan (#3554)
Fixes #3542. Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
This commit is contained in:
@@ -109,8 +109,7 @@ bool AnalogTrigger::GetTriggerState() {
|
||||
std::shared_ptr<AnalogTriggerOutput> AnalogTrigger::CreateOutput(
|
||||
AnalogTriggerType type) const {
|
||||
return std::shared_ptr<AnalogTriggerOutput>(
|
||||
new AnalogTriggerOutput(*this, type),
|
||||
wpi::NullDeleter<AnalogTriggerOutput>());
|
||||
new AnalogTriggerOutput(*this, type));
|
||||
}
|
||||
|
||||
void AnalogTrigger::InitSendable(wpi::SendableBuilder& builder) {
|
||||
|
||||
Reference in New Issue
Block a user