Slither

Slither

Community Analyzer

If a return is used instead of a leave SLITHER-W1026

Anti-pattern
Critical

Detect if a return is used where a leave should be used.

Exploit Scenario

contract C {
    function f() internal returns (uint a, uint b) {
        assembly {
            return (5, 6)
        }
    }

}

The function will halt the execution, instead of returning a two uint.

Recommendation

Use the leave statement.

Learn more

return-leave on Slither's wiki.