Merge "msm: adsprpc: Validate the channel in file free"
This commit is contained in:
commit
1a8360450f
@ -5430,6 +5430,7 @@ static int fastrpc_file_free(struct fastrpc_file *fl)
|
||||
int cid;
|
||||
struct fastrpc_apps *me = &gfa;
|
||||
bool is_driver_closed = false;
|
||||
int err = 0;
|
||||
|
||||
if (!fl)
|
||||
return 0;
|
||||
@ -5507,9 +5508,10 @@ static int fastrpc_file_free(struct fastrpc_file *fl)
|
||||
device_unregister(&fl->device->dev);
|
||||
}
|
||||
|
||||
if (fl->sctx)
|
||||
VERIFY(err, VALID_FASTRPC_CID(fl->cid));
|
||||
if (!err && fl->sctx)
|
||||
fastrpc_session_free(&fl->apps->channel[cid], fl->sctx);
|
||||
if (fl->secsctx)
|
||||
if (!err && fl->secsctx)
|
||||
fastrpc_session_free(&fl->apps->channel[cid], fl->secsctx);
|
||||
|
||||
fastrpc_remote_buf_list_free(fl);
|
||||
|
Loading…
Reference in New Issue
Block a user