extra: remove a variable from match_comparison()
[smatch.git] / validation / sm_redundant_check.c
blob27d26d0bbffa8d599f0b5b02f222ef2ce09e40cb
1 void free(void *ptr);
2 void frob(void *ptr);
4 int x,y,z;
5 void func (void)
7 if (x)
8 free(x);
9 if (y)
10 frob(y);
11 free(y);
12 if (z) {
13 free(z);
19 * check-name: Redundant NULL check
20 * check-command: smatch sm_redundant_check.c
22 * check-output-start
23 sm_redundant_check.c:8 func(3) info: redundant null check on x calling free()
24 sm_redundant_check.c:13 func(8) info: redundant null check on z calling free()
25 * check-output-end