From 20406a705707e8e2086b0dc9c446889eb5d9bd4a Mon Sep 17 00:00:00 2001
From: Dong Anyuan <donganyuan@cn.fujitsu.com>
Date: Thu, 20 Jun 2019 13:56:05 +0900
Subject: [PATCH] Fix Coverity Scan CID 340268 (Passing freed pointer
 pdu_mem_pP as an argument to rlc_um_store_pdu_in_dar_buffer.)

---
 openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c
index a0569b7f00..f37626ae4c 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c
@@ -1038,6 +1038,8 @@ rlc_um_receive_process_dar (
     sn = pdu_pP->b1 & 0x1F;
   } else {
     free_mem_block(pdu_mem_pP, __func__);
+    pdu_mem_pP = NULL;
+    return;
   }
 
   RLC_UM_MUTEX_LOCK(&rlc_pP->lock_dar_buffer, ctxt_pP, rlc_pP);
-- 
GitLab