Merge "diag: Prevent NULL pointer dereference while closing logging process" into msm-4.9