One is easy. free(cOffset); before the font register routine returns.

The other should also be easy, I'm testing it now.