[misc] Prevent variable leaks