Improve the Matlab module.
Fix a leak in the Matlab module.