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
flow: fix some parent transition fallout
[smatch.git]
/
validation
/
sm_memleak2.c
blob
a6a0df85b11fca078382c8f2130e3d85efcad6b8
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() warn: overwrite may leak 'ptr'
18
* check-output-end
19
*/