repo.or.cz
/
smatch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
db: caller info needs to record the -1 parameters
[smatch.git]
/
validation
/
sm_memleak2.c
blob
4794b0f524f3cec392296ef09ffe1e6330fc4ff2
1
#include <stdlib.h>
2
3
void
func
(
void
)
4
{
5
void
*
ptr
;
6
7
ptr
=
malloc
(
42
);
8
ptr
= (
void
*)
0
;
9
10
return
;
11
}
12
/*
13
* check-name: leak test #2
14
* check-command: smatch sm_memleak2.c
15
*
16
* check-output-start
17
sm_memleak2.c +8 func(5) warn: overwrite may leak 'ptr'
18
* check-output-end
19
*/