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

Benjamin Kramer benny.kra at gmail.com
Mon Jun 15 08:46:55 PDT 2015


> On 15.06.2015, at 17:38, Eli Bendersky <eliben at google.com> wrote:
> 
> Thanks for the fix, Benjamin. Shouldn't this use LLVMDisposeMessage though, rather than free?

Good catch! Fixed in r239731.

- Ben

> 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
> 





More information about the llvm-commits mailing list