MdeModulePkg/PiSmmCore: fix #PF caused by freeing read-only memory