app/testpmd: fix exit without freeing resources