diff options
| -rw-r--r-- | drivers/char/adsprpc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 0345e977a2d4..73f0e7449aba 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -2082,6 +2082,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); |
