Fix memory leaks in the new error return from modinv.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9992 cda61777-01e9-0310-a592-d414129be87e