Fix memory leak in rr::Optimizer
Leak was introduced in 5ba2a5b9.
There are calls to setUses(operand, nullptr) in the algorithm, that,
with the latest changes, would simply replace the existing allocated
Uses object with a new one. Fix it so that setUses(operand, nullptr)
deletes an existing Uses object on the Operand before allocating and
assigning a new one.
Bug: b/145754674
Change-Id: Ie1438378595401619831a2da81d4d0d54a606f80
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/40628Reviewed-by:
Ben Clayton <bclayton@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Tested-by:
Antonio Maiorano <amaiorano@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Showing
Please
register
or
sign in
to comment