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

qcacmn: Add null check for reg_rx_ops

Add null check for reg_rx_ops in reg_ch_avoid event handler.

Change-Id: I15f1b7fa13714ba6ea134ceaa892b2692fad8454
CRs-Fixed: 2702122
Shashikala Prabhu 5 жил өмнө
parent
commit
803403f264

+ 4 - 0
target_if/regulatory/src/target_if_reg_lte.c

@@ -52,6 +52,10 @@ static int tgt_reg_ch_avoid_event_handler(ol_scn_t handle, uint8_t *event_buf,
 	}
 
 	reg_rx_ops = target_if_regulatory_get_rx_ops(psoc);
+	if (!reg_rx_ops) {
+		target_if_err("reg_rx_ops is NULL");
+		return -EINVAL;
+	}
 
 	if (!reg_rx_ops->reg_ch_avoid_event_handler) {
 		target_if_err("reg_ch_avoid_event_handler is NULL");