flow: reset position after calling cleanup functions
commit9a6f11afe475205c9b54c2ee9dc5ca484a661a33
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 15 Aug 2024 11:07:16 +0000 (15 14:07 +0300)
committerDan Carpenter <dan.carpenter@linaro.org>
Thu, 15 Aug 2024 11:07:16 +0000 (15 14:07 +0300)
tree3e4231439bbe4a735b1d67a7b1fbd0434e5b64d0
parent4fa402f2c01a678e66492ecf2a54fcdee4195760
flow: reset position after calling cleanup functions

When there is a cleanup function then what happens is that Smatch
generates a fake function call.  The issue is that the fake call messes
up the current position.  So if you're planning to print an warning
message for that return, it instead get printed on the line where the
cleanup function was declared.

Save the current position, and reset it back to where it was after calling
the cleanup function.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
smatch_flow.c