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

qcacmn: Fix false alarm of double nbuf allocation

In qdf_nbuf_unshare do not add new debug record when
allocation fails

Change-Id: Icece871a9e75af19841cf6824f286735660b09e3
Chaithanya Garrepalli 5 жил өмнө
parent
commit
45ecf4361c
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      qdf/inc/qdf_nbuf.h

+ 3 - 2
qdf/inc/qdf_nbuf.h

@@ -3267,8 +3267,9 @@ qdf_nbuf_unshare_debug(qdf_nbuf_t buf, const char *func_name, uint32_t line_num)
 	if (qdf_likely(buf != unshared_buf)) {
 		qdf_net_buf_debug_delete_node(buf);
 
-		qdf_net_buf_debug_add_node(unshared_buf, 0,
-					   func_name, line_num);
+		if (unshared_buf)
+			qdf_net_buf_debug_add_node(unshared_buf, 0,
+						   func_name, line_num);
 	}
 
 	return unshared_buf;