Skip to content
Commit 20d7c96c authored by George Burgess IV's avatar George Burgess IV Committed by George Burgess
Browse files

verity: Fix memory leaks

This CL refactors this code slightly in order to fix memory leaks
reported by the static analyzer. In general, RAII classes are
stack-allocated and moveable, rather than being heap-allocated. (If they
are heap-allocated, they should sit in a unique_ptr.)

Since it looks like this class has no children (adding `final` still
builds without issue), this devirtualizes its dtor, as well.

Finally, it looks like one instance of this class can easily be replaced
with a stack variable, so that's done, too.

Bug: None
Test: Built with the analyzer. Complaints are gone.
Change-Id: I6d284b06828afd47987534720bdaaa99e54b2c4c
parent 03f6205e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment