Fixed two resource leaks

Signed-off-by: wc <wc@VATI-PC>
Merge branch 'master' of https://github.com/OpenSourcePhysics/osp.git