diag: Prevent NULL pointer dereference while closing logging process

Prevent NULL pointer dereference while copying the data to memory device
process by adding mutex protection when closing the process.

Change-Id: Idaad73fb8b2a0bb5a4983d5e255bfdf702cecf71
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
1 file changed