update README
fix a potential dangling pointer