r215898 - Fix a memory leak in one of the test unit. Silent coverity warning CID 1095912

Nico Weber thakis at chromium.org
Mon Aug 18 09:23:10 PDT 2014


We have a (green) msan bot that should've found this too. I guess this
isn't covered by a test? Is there a way to do that?


On Mon, Aug 18, 2014 at 8:18 AM, Sylvestre Ledru <sylvestre at debian.org>
wrote:

> Author: sylvestre
> Date: Mon Aug 18 10:18:56 2014
> New Revision: 215898
>
> URL: http://llvm.org/viewvc/llvm-project?rev=215898&view=rev
> Log:
> Fix a memory leak in one of the test unit. Silent coverity warning CID
> 1095912
>
> Modified:
>     cfe/trunk/tools/c-index-test/c-index-test.c
>
> Modified: cfe/trunk/tools/c-index-test/c-index-test.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=215898&r1=215897&r2=215898&view=diff
>
> ==============================================================================
> --- cfe/trunk/tools/c-index-test/c-index-test.c (original)
> +++ cfe/trunk/tools/c-index-test/c-index-test.c Mon Aug 18 10:18:56 2014
> @@ -1643,6 +1643,7 @@ static int perform_file_scan(const char
>
>    if ((fp = fopen(source_file, "r")) == NULL) {
>      fprintf(stderr, "Could not open '%s'\n", source_file);
> +    clang_disposeTranslationUnit(TU);
>      return 1;
>    }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140818/27e8b5fb/attachment.html>


More information about the cfe-commits mailing list