[PATCH v2] selftests: net: avoid memory leak