[RAMEN9610-19721][COMMON] media: mfc: fix the prevent issue
authorseungmin.ahn <seungmin.ahn@samsung.com>
Tue, 18 Jun 2019 05:12:55 +0000 (14:12 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Mon, 9 Sep 2019 11:14:40 +0000 (20:14 +0900)
Fixed null pointer dereference(FORWARD_NULL)

Change-Id: Idb8f7f271d49ce0ac936e0885bd868d7eb94ea39
Signed-off-by: seungmin.ahn <seungmin.ahn@samsung.com>
drivers/media/platform/exynos/mfc/mfc_run.c

index db344ff1245aac5678c95f5cf643e76e6f459bf4..6ba29c0bd4149c0ee62c77962e5c4ea24835275e 100644 (file)
@@ -594,7 +594,7 @@ int mfc_run_enc_last_frames(struct mfc_ctx *ctx)
        mfc_set_enc_frame_buffer(ctx, 0, raw->num_planes);
 
        /* encoder dst buffer CFW PROT */
-       if (ctx->is_drm) {
+       if (dst_mb && ctx->is_drm) {
                int index = dst_mb->vb.vb2_buf.index;
 
                mfc_stream_protect(ctx, dst_mb, index);