Help ID a horror film

…from my memory, which is charitably described as ‘sketchy’.

70’s or 80’s, weird murders being investigated by local sheriff (or local cop). Local cop keeps in contact with the coroner.

I remember the last scene where the local cop, to his horror, finds out he has actually been dead for some time and is starting to fall apart. the coroner has known this all along the last line was something like ‘let me fix that for you’.

Any ideas?

Dead And Buried.

That’s it! Thanks!