Remove global variable leak
Merge pull request #582 from daniel-franz/patch-10

Remove global variable leak