[openEuler-5.10 450/557] apparmor: fix error check