]> granicus.if.org Git - clang/commit
[analyzer] Support kfree in MallocChecker
authorNathan Huckleberry <nhuck@google.com>
Mon, 1 Jul 2019 23:29:10 +0000 (23:29 +0000)
committerNathan Huckleberry <nhuck@google.com>
Mon, 1 Jul 2019 23:29:10 +0000 (23:29 +0000)
commit651488e3af557d5d735bcafffb4934ffc95d9baf
tree30e3066fc7484a8850ef4cc0ad38279bf1490b02
parent1ed8f43fca621b15fa800aabed5cb52c13554ff2
[analyzer] Support kfree in MallocChecker

Summary:
kmalloc is freed with kfree in the linux kernel. kmalloc support was
added in r204832, but kfree was not. Adding kfree fixes incorrectly
detected memory leaks.

Reviewers: NoQ, nickdesaulniers, dcoughlin, Szelethus

Reviewed By: NoQ, Szelethus

Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64030

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364875 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
test/Analysis/kmalloc-linux.c