item_updater: Fix crash on redundantPriority

When the BIOS update is enabled, the activation of the BIOS does not
have redundantPriority.
After BIOS update, the code will have an activation without
redundantPriority.
In such case, the BMC update will fail due to the crash in freeSpace()
that uses the redundantPriority.

Fix it by checking if the redundantPriority is null or not, and skip
the activations that has no redundantPriority.

Tested: Verify the phosphor-image-updater does not crash on the above
        case.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I92ac9e0f9f02067ceefd0011d01464e8bbd743a5
1 file changed