Fix memory leak. Oops :(.

Found by KindOne on IRC. Thanks!
Merge pull request #324 from Elizacat/master

Fix minor memory leak