clean smemory without side effect

Signed-off-by: xiehuc <xiehuc@gmail.com>