Of course if he is defeated, Obama could release the prisoners just to make things more difficult for the next President.
I have a very real fear that he may do exactly that. In addition he may pardon the blind sheik as the new president of Egypt has demanded. Our AG Holder has extensive experience with these kinds of actions on the way out of office.