memory free problem