[llvm] r237072 - Fixing memory leak

Kaylor, Andrew andrew.kaylor at intel.com
Tue May 12 09:40:37 PDT 2015


>>==============================================================================
>>--- llvm/trunk/lib/CodeGen/WinEHPrepare.cpp (original)
>>+++ llvm/trunk/lib/CodeGen/WinEHPrepare.cpp Mon May 11 19:13:51 2015
>>@@ -882,7 +882,9 @@ bool WinEHPrepare::prepareExceptionHandl
>>         Function *Handler = cast<Function>(CA->getHandlerBlockOrFunc());
>>         getPossibleReturnTargets(&F, Handler, ReturnTargets);
>>       }
>>+      delete Action;

>Any chance of using unique_ptr?

I think you suggested this once before, and every time I leak the members of this list the suggestion becomes more compelling.

It’s on my list of things to do.  There’s another use of this list that complicates things a little and this code is still in flux, but maybe I’ll just go ahead and handle it.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150512/f62968e9/attachment.html>


More information about the llvm-commits mailing list