Frank Darabont's movie The Mist is based on a Stephen King short story The Mist. But the two do not have the same ending.
Here is how the short story ends (as per Wikipedia):
David, Billy, Amanda, and elderly, yet tough, school teacher Hilda Reppler reach the car and leave Bridgton, driving south for hours through a mist-shrouded, monster-filled New England. After finding refuge for the night, David listens to a radio and, through the overwhelming static, possibly hears a single word broadcast: "Hartford". With that one shred of hope, he prepares to drive on into an uncertain future.
Whereas the movie has a much more definite ending (again as per Wikipedia):
Driving through the mist, David finds his house destroyed and his wife dead. Devastated, he drives the group south, passing destroyed vehicles and seeing a gigantic six-legged, tentacled beast. When they run out of gas, the group decides there is no point in going on. David shoots the others rather than have them endure horrifying deaths, but is left with no bullet to use on himself.
He leaves the car and waits to be killed, but the mist suddenly recedes, revealing that the U.S. Army has arrived, rescued whatever survivors, and restored order. Among the survivors is the woman who left the store at the phenomenon's onset, accompanied by her two children. David breaks down with the realization that they were only moments from being rescued and had likely been driving away from help the entire time.
Did King approve of this ending?