Эх сурвалжийг харах

msm: adsprpc: null check for context map

Add null check for context map before increamenting reference count.

Signed-off-by: Santosh Sakore <[email protected]>
Santosh Sakore 2 жил өмнө
parent
commit
9fd8a867bf
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      dsp/adsprpc.c

+ 1 - 1
dsp/adsprpc.c

@@ -2395,7 +2395,7 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
 			}
 			mutex_unlock(&ctx->fl->map_mutex);
 			goto bail;
-		} else {
+		} else if (ctx->maps[i]) {
 			/*
 			 * Increment ctx refs count for in/out handle if map created
 			 * and no error, indicate map under use in remote call