net: fix leak in test.