On Fri, Oct 24, 2014 at 9:31 AM, Benjamin Kramer <[email protected]>
wrote:

> Author: d0k
> Date: Fri Oct 24 11:31:42 2014
> New Revision: 220569
>
> URL: http://llvm.org/viewvc/llvm-project?rev=220569&view=rev
> Log:
> [Modules] Free modules that failed signature verification.
>
> The control flow and ownership is weird enough so unique_ptr doesn't help
> here :(
>

I've had a go at unique_ptrification in http://reviews.llvm.org/D5980 (but
yeah, I think I stumbled across this too at some point & decided it was too
hard at the time)


>
> Modified:
>     cfe/trunk/lib/Serialization/ModuleManager.cpp
>
> Modified: cfe/trunk/lib/Serialization/ModuleManager.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ModuleManager.cpp?rev=220569&r1=220568&r2=220569&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Serialization/ModuleManager.cpp (original)
> +++ cfe/trunk/lib/Serialization/ModuleManager.cpp Fri Oct 24 11:31:42 2014
> @@ -145,6 +145,7 @@ ModuleManager::addModule(StringRef FileN
>          // module is *itself* up to date, but has an out-of-date importer.
>          Modules.erase(Entry);
>          Chain.pop_back();
> +        delete New;
>          return OutOfDate;
>        }
>      }
>
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to