Merge "lmkd: Fix an invalid access to a pointer after it's freed"