check_memory: eliminate some false positives
Originally check_memory was going to try find memory leaks. Then checking
for double frees was tacked on.
For checking for leaks I wanted to use get_variable_from_expr_complex()
because that eliminated some false positives. But for checking for
double frees it added false positives:
kfree(a[i]);
i++;
kfree(a[i]); // double free false positive printed here.
It's not a very good check. I will rewrite it eventually but for now I may
as well commit these fixes which I wrote earlier.
Signed-off-by: Dan Carpenter <error27@gmail.com>