Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a01d6c5 authored by Sathish Ambley's avatar Sathish Ambley
Browse files

msm: ADSPRPC: Free file private data after session close



Release the session before the file data is freed to
allow for session informaiton to be retrieved from the
file data.

Change-Id: I78c36d7b34a141c6162a145f7447040395858b64
Acked-by: default avatarBharath Kumar <bkumar@qti.qualcomm.com>
Signed-off-by: default avatarSathish Ambley <sathishambley@codeaurora.org>
parent d5809484
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1715,12 +1715,12 @@ static int fastrpc_device_release(struct inode *inode, struct file *file)

	if (fl) {
		cid = fl->cid;
		fastrpc_file_free(fl);
		file->private_data = 0;
		if (fl->sctx) {
			session = fl->sctx - &me->channel[cid].session[0];
			fastrpc_session_free(&me->channel[cid], session);
		}
		fastrpc_file_free(fl);
		file->private_data = 0;
	}
	return 0;
}