[llvm] r239673 - [LinkerTest] Don't leak error string.

Eli Bendersky eliben at google.com
Mon Jun 15 08:38:44 PDT 2015


Thanks for the fix, Benjamin. Shouldn't this use LLVMDisposeMessage though,
rather than free?

On Sat, Jun 13, 2015 at 5:53 AM, Benjamin Kramer <benny.kra at googlemail.com>
wrote:

> Author: d0k
> Date: Sat Jun 13 07:53:21 2015
> New Revision: 239673
>
> URL: http://llvm.org/viewvc/llvm-project?rev=239673&view=rev
> Log:
> [LinkerTest] Don't leak error string.
>
> Modified:
>     llvm/trunk/unittests/Linker/LinkModulesTest.cpp
>
> Modified: llvm/trunk/unittests/Linker/LinkModulesTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Linker/LinkModulesTest.cpp?rev=239673&r1=239672&r2=239673&view=diff
>
> ==============================================================================
> --- llvm/trunk/unittests/Linker/LinkModulesTest.cpp (original)
> +++ llvm/trunk/unittests/Linker/LinkModulesTest.cpp Sat Jun 13 07:53:21
> 2015
> @@ -216,6 +216,7 @@ TEST_F(LinkModuleTest, CAPIFailure) {
>                                      LLVMLinkerDestroySource, &errout);
>    EXPECT_EQ(1, result);
>    EXPECT_STREQ("Linking globals named 'foo': symbol multiply defined!",
> errout);
> +  std::free(errout);
>  }
>
>  } // end anonymous namespace
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150615/983a6508/attachment.html>


More information about the llvm-commits mailing list