summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-03-09 17:21:33 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-09 17:21:32 -0800
commitdb08e7c668ac3c52f8cde4feeb2d24fef687b112 (patch)
tree57a321a5dfff784305b6a29485305793e317332a /drivers/char
parent3a9ea3d5335330e66dc313253c055442c9db7b8e (diff)
parentdf22d814021fbb88ee53f85e013b4fcfceab2f41 (diff)
Merge "msm: ADSPRPC: Null check for file session context during release"
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/adsprpc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c
index 700b5c80aff5..7820f5625266 100644
--- a/drivers/char/adsprpc.c
+++ b/drivers/char/adsprpc.c
@@ -2114,6 +2114,10 @@ static int fastrpc_file_free(struct fastrpc_file *fl)
hlist_del_init(&fl->hn);
spin_unlock(&fl->apps->hlock);
+ if (!fl->sctx) {
+ kfree(fl);
+ return 0;
+ }
(void)fastrpc_release_current_dsp_process(fl);
fastrpc_context_list_dtor(fl);
fastrpc_buf_list_free(fl);