mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-03-02 20:30:11 +01:00
Fix memory leak in concrete constraints
This patch fixes a memory leak found from ASAN testing. There may be more here, but this is the only one blocking our workflow.
This commit is contained in:
parent
c1e75c700f
commit
1f964c1299
@ -189,16 +189,16 @@ public:
|
|||||||
|
|
||||||
adapters::FrozenValue * getValue() const
|
adapters::FrozenValue * getValue() const
|
||||||
{
|
{
|
||||||
return m_value;
|
return m_value.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setValue(const adapters::Adapter &value)
|
void setValue(const adapters::Adapter &value)
|
||||||
{
|
{
|
||||||
m_value = value.freeze();
|
m_value = std::unique_ptr<adapters::FrozenValue>(value.freeze());
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
adapters::FrozenValue *m_value;
|
std::unique_ptr<adapters::FrozenValue> m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user