[llvm-bugs] [Bug 26292] New: tools/clang/tools/libclang/CIndex.cpp: 2 * memory leak ?

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 25 08:48:14 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26292

            Bug ID: 26292
           Summary: tools/clang/tools/libclang/CIndex.cpp: 2 * memory leak
                    ?
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dcb314 at hotmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

1.

tools/clang/tools/libclang/CIndex.cpp:3544]: (error) Memory leak: result

Source code is

      if (rettype->isVectorType() || callExpr->getNumArgs() > 1) {
        return nullptr;
      }

but

 ExprEvalResult *result = (ExprEvalResult *) malloc(sizeof(ExprEvalResult));

2.

tools/clang/tools/libclang/CIndex.cpp:3550]: (error) Memory leak: result

Source code is

        if(callExpr->getNumArgs() == 1 &&
              !callExpr->getArg(0)->getType()->isIntegralType(ctx)){

          return nullptr;
        }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160125/d97190b8/attachment.html>


More information about the llvm-bugs mailing list