get_variable_from_expr_complex(): return proper symbol for array expressions
[smatch.git] / validation / sm_memleak2.c
blobc344624a19a20be2c76d2b7111c43b13359fc9f7
1 void func (void)
3 void *ptr;
5 ptr = malloc(42);
6 ptr = (void *) 0;
8 return;
11 * check-name: leak test #2
12 * check-command: smatch sm_memleak2.c
14 * check-output-start
15 sm_memleak2.c +6 func(5) error: memory leak of 'ptr'
16 * check-output-end