Avoid possibly freeing null pointer.

Added check for null before freeing clipmask, since it is not
guaranteed to have been allocated in the context in which is is being
freed.
Prevent possible leak by freeing temp.buffer outside conditional.

Moved freeing temp.buffer outside of the conditional block to avoid a
potential memory leak if that condition isn't taken.

(This is admittedly an edge case and can only happen if both
sc->parent->multilayer and sc->parent->strokedfont are somehow both
true.)