Barack Obama actually said...
While I'm President, I'm not going to have a safe haven for terrorists and walk away from the Afghans.
Context
On-the-Record Conference Call by Senior Administration Officials on Afghanistan
10/14/2015