buf_comparison: don't use assigned variable so much
commitc55037cfc2c868e452cabca5a29d0ae4db622edf
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 20 Jun 2022 11:21:25 +0000 (20 14:21 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 20 Jun 2022 11:21:25 +0000 (20 14:21 +0300)
tree6367f4dadb74eedda645a5917f6add469458ad0b
parent7c607b927de25241645fd70a655c591bba789154
buf_comparison: don't use assigned variable so much

The bug here is that we have:

len = min_t();
...
buf = kmalloc(len, GFP_KERNEL);

Originally it would record that "buf" is size min_t() which is accurate but
not as useful as saying that it's "len".  We do still want to handle
"len = nr * sizeof();" so we track those assignments still.

A more ideal solution would be to record both relationships.  #IDEA

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_buf_comparison.c