Don't leak
Don't leak even if there's no patch.
Return whether or not the patch was clean
Log an error instead of dying. There's no need for rv.