It depends what you mean.
If you're talking about a teacher who dishes out 'fail' results generously, I'd say he's "generous with failures".
But if you're talking about someone who gives out money or gifts in spite of his own personal financial setbacks, then I'd say he's "generous in failures" but to improve clarity (unless minimising words is a massive goal) it should be changed to "generous in spite of failures".