When mortgage holders die what are mine and the mortgage company rights?

If a mortgage holder (mortgagee) dies the rights under the mortgage pass to her heirs. If a mortgagor (borrower) dies the mortgage company has a lien on real estate that still must be paid.