extra: small fix for when the database is disabled but we have inline info
[smatch.git] / validation / sm_redundant_check.c
blob569df631379b7f7cd16a9763634701363cf99958
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() info: redundant null check on x calling free()
24 sm_redundant_check.c:13 func() info: redundant null check on z calling free()
25 * check-output-end