MdeModulePkg CapsuleApp: Check Buffer against NULL before freeing it