Dangling pointer example 1