[PATCH 5.18 878/879] macsec: fix UAF bug for real_dev