It is acceptable to leave wire in the wall. Leaving the ends exposed in boxes and wire nut is the only thing you need to do. If someone tries to tie into them in the future, it will cause the breaker to pop.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.