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

Sylvestre Ledru sylvestre at debian.org
Mon Aug 18 14:14:43 PDT 2014


This has been found by Coverity (http://scan.coverity.com/).
They are doing static analysis unlike msan. I don't know how you can
fall in this case.

Cheers,
Sylvestre

On 18/08/2014 18:23, Nico Weber wrote:
> 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
> <mailto: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 <mailto: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/3a96a757/attachment.html>


More information about the cfe-commits mailing list