Merge pull request #8625 from davidhorstmann-arm/fix-uninit-mpi-test-2.28

[Backport 2.28] Fix possible free of uninitialized MPI