Fix a potential resource leak.
Merge pull request #3 from lioncash/master

Fix a potential resource leak.