The defer was probably added later, and the developer who added the defer probably forgot to remove the v.close() in the second error check. Depending on what v.close() does, it can either have no consequences, be intentional and have a purpose, or crash the program. So I think this could be marked as suspicious.
Consider a piece code like this:
The
defer
was probably added later, and the developer who added thedefer
probably forgot to remove thev.close()
in the second error check. Depending on whatv.close()
does, it can either have no consequences, be intentional and have a purpose, or crash the program. So I think this could be marked as suspicious.