implied_value: don't get confused by casts
[smatch.git] / validation / sm_memleak2.c
bloba6a0df85b11fca078382c8f2130e3d85efcad6b8
1 #include <stdlib.h>
3 void func (void)
5 void *ptr;
7 ptr = malloc(42);
8 ptr = (void *) 0;
10 return;
13 * check-name: leak test #2
14 * check-command: smatch sm_memleak2.c
16 * check-output-start
17 sm_memleak2.c:8 func() warn: overwrite may leak 'ptr'
18 * check-output-end