merge with inet-framework
fix memory leak