Once upon a time, in the city of Kashi in northern India, a man came upon a large banyan tree. He immediately thought there must be a godling living there. So he made the promise to this tree spirit that he would perform a gory animal sacrifice in return for a wish being granted.
It just so happened that his wish was fulfilled -- whether by a deva, a demon (mara, yakkha, naga, asura, naraka, etc.), or by some other means. But the man was sure the tree deva had answered his prayer, so he wanted to keep his promise.
Since it was a big wish, it called for a big sacrifice. He brought many goats, mules, chickens, and sheep. He collected firewood and prepared to burn the helpless animals alive as a sacrifice.
The spirit living in the banyan tree appeared and said:
"Oh friend, you made a promise and are bound by it. You think you must keep the promise in order to be released from the bondage to it. But if you commit such terrible unwholesome acts -- even as you promised -- the painful results will put you in much greater bondage. For you will be forced to suffer those results in this life, the next life, and even by rebirths in hellish worlds! The way to release yourself into future deliverance is to give up unwholesome actions, no matter what.
"Furthermore, since you think I'm a godling, what makes you think I eat meat? Haven't you heard that we devas eat better things, like ambrosia, nectar, stardust, or sunbeams? I have no need or desire for meat or any other food offerings." Then the deva disappeared.
The foolish man understood the mistake he had made. Instead of doing unwholesome deeds (bad karma) that would force unhappy results on him in the future, he began to do only wholesome deeds (beneficial karma) that would benefit him and others. And the moral to the story is this:
"Keeping a bad promise is worse than making it."