switch/nrt - Fix memory leak