diag: Avoid memory leak

DIAG allocates memory to read from SMD channel. if for some reason,
the read function is to be exited, the allocated memory should be
released.

Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
1 file changed