__module_put_and_exit() doesn't return.
[smatch.git] / validation / sm_memory.c
blobf24a74a9c6f617cbfbf27cba764723c13d49692a
1 struct ture {
2 int *a;
3 };
5 struct ture *a;
6 struct ture *b;
7 void func (void)
9 struct ture *aa;
10 struct ture *ab;
11 struct ture *ac;
12 aa = kmalloc();
13 ab = kmalloc();
14 ac = kmalloc();
16 a = aa;
17 if (ab) {
18 free(ab);
19 return;
21 free(ac);
22 return;
25 * check-name: leak test #1
26 * check-command: smatch sm_memory.c
28 * check-output-start
29 sm_memory.c +19 func(12) error: memery leak of ac
30 * check-output-end