[PATCH BlueZ 1/2] monitor: Fix crash when there is no write handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 monitor/att.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/att.c b/monitor/att.c
index f9643b333..d3b82074f 100644
--- a/monitor/att.c
+++ b/monitor/att.c
@@ -2946,7 +2946,7 @@ static void print_write(const struct l2cap_frame *frame, uint16_t handle,
 		return;
 
 	handler = get_handler(attr);
-	if (!handler)
+	if (!handler || !handler->write)
 		return;
 
 	handler->write(frame);
-- 
2.34.1




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux