I find example 1 irritating, because the missing return statement at the end of a value-returning function immediately triggers the "Wait, there's something wrong"-flag. So in cases like this, I would go with example 2.
However, usually there is more involved, depending on the purpose of the function, e.g. error handling, logging, etc. So I'm with Lorand Kedves' answer on this, and usually have one exit point at the end, even at the cost of an additional flag variable. It makes maintenance and later extensions easier in most cases.