[PATCH] btmgmt: Fix use after free in mgmt_check_pending

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

 



Break loop when pending command was found and callback called.
---
 mgmt/main.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/mgmt/main.c b/mgmt/main.c
index 6e35071..b2d6c3c 100644
--- a/mgmt/main.c
+++ b/mgmt/main.c
@@ -141,6 +141,7 @@ static void mgmt_check_pending(int mgmt_sk, uint16_t op, uint16_t index,
 		c->cb(mgmt_sk, op, index, status, data, len, c->user_data);
 
 		free(c);
+		break;
 	}
 }
 
-- 
1.7.10


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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