gallivm: Prevent double delete on LLVM 3.6
authorJose Fonseca <jfonseca@vmware.com>
Thu, 12 Mar 2015 09:57:43 +0000 (09:57 +0000)
committerJose Fonseca <jfonseca@vmware.com>
Thu, 12 Mar 2015 10:01:09 +0000 (10:01 +0000)
commit70dc8a9930f561d7ce6db7e58b5bc9b4d940e37b
treea09040103043218692c9e551f19fe3123082b0d4
parent30916a5ef008a84e53d9821ccc11a0dee50fe77b
gallivm: Prevent double delete on LLVM 3.6

std::unique_ptr takes ownership of MM, and a double delete could ensure
in case of an error,  as pointed out by Chris Vine in
https://bugs.freedesktop.org/show_bug.cgi?id=89387

Reviewed-by: Chris Vine <chris@cvine.freeserve.co.uk>
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp