Skip to content

Commit 100d8f7

Browse files
authored
[clang][docs] Fix example in SanitizerSpecialCaseList.rst (#149244)
As-ie example suppresses buffer overflow in malloc, and leave memory leak in place. It can be confusing. Fixes #62421.
1 parent 2da5928 commit 100d8f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/docs/SanitizerSpecialCaseList.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Example
3939
void bad_foo() {
4040
int *a = (int*)malloc(40);
4141
a[10] = 1;
42+
free(a);
4243
}
4344
int main() { bad_foo(); }
4445
$ cat ignorelist.txt

0 commit comments

Comments
 (0)