OSDN Git Service

Fix memory leak of Subzero global inits.
authorNicolas Capens <capn@google.com>
Wed, 5 Jul 2017 19:04:00 +0000 (15:04 -0400)
committerNicolas Capens <capn@google.com>
Wed, 5 Jul 2017 19:16:05 +0000 (19:16 +0000)
commit83a6bb93fd825b975161546ff92d6fb77a7a9c22
treea30571b70f8f9fe99717c566fc12fb76c998d3e9
parent619a8c5a7275d5b2f6e162e056ac41e37281a569
Fix memory leak of Subzero global inits.

getGlobalInits() moves ownership of a unique_ptr<>, which we released
to obtain the raw pointer, but we didn't delete it afterwards. This is
fixed by keeping the unique_ptr<> and having it freed at the end of the
scope.

Bug chromium:732739

Change-Id: I4d8c9367f34790944daabc0417af08eb4b4c7c2e
Reviewed-on: https://swiftshader-review.googlesource.com/10409
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/Reactor/SubzeroReactor.cpp