浏览代码

qcacmn: fix potential NULL pointer dereference issue

Fix potential NULL pointer dereference issue in
dp_rx_buffer_pool_refill().

Change-Id: I728077fac9f5062c68d92bb219b305b61fb1e9f0
CRs-Fixed: 2858208
Manikanta Pubbisetty 4 年之前
父节点
当前提交
174c6614a1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      dp/wifi3.0/dp_rx_buffer_pool.c

+ 2 - 2
dp/wifi3.0/dp_rx_buffer_pool.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -35,7 +35,7 @@ bool dp_rx_buffer_pool_refill(struct dp_soc *soc, qdf_nbuf_t nbuf, u8 mac_id)
 	qdf_nbuf_t next_nbuf, first_nbuf, refill_nbuf;
 	bool consumed = false;
 
-	if (!bufpool->is_initialized)
+	if (!bufpool->is_initialized || !pdev)
 		return consumed;
 
 	/* process only buffers of RXDMA ring */