[PATCH] mfplat/sample: Fix use-after-free of a critical section.