[PATCH 4.14 34/61] efi: capsule-loader: Fix use-after-free in efi_capsule_write