param_used: fix use after free
There are a couple issues here. Inline functions weren't handled.
But the main tricky thing is that param_used is setting states basically
every time we look up a state. So at the end of the function, we would
free our list of states, then a different check would look up something
and we'd set some more states. The list is still hanging around but
Smatch would free the snames so when we went to insert some new states it
would get a use after free. The fix is to free the &used_stree at the
start of the function. And we have to be registered before smatch_extra.c
so that we free before we start setting states.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>