Fixed leaking “tmp” variable

The tmp variable on line 282 wasn't declared and leaking. This should fix it