git: 766da930f994 - stable/12 - Fix a use-after-free in an error case.

Takanori Watanabe takawata at FreeBSD.org
Mon Jun 28 04:00:30 UTC 2021


The branch stable/12 has been updated by takawata:

URL: https://cgit.FreeBSD.org/src/commit/?id=766da930f994bc0fe27cc9235f0594a6c4e0a88f

commit 766da930f994bc0fe27cc9235f0594a6c4e0a88f
Author:     Takanori Watanabe <takawata at FreeBSD.org>
AuthorDate: 2021-05-26 09:23:33 +0000
Commit:     Takanori Watanabe <takawata at FreeBSD.org>
CommitDate: 2021-06-28 03:58:48 +0000

    Fix a use-after-free in an error case.
    
    PR: 255872
    Submitted by:  lylgood
    Differential Revision:  https://reviews.freebsd.org/D30454
    
    (cherry picked from commit 14803ec8d193d8d46f4137a7dba61b277c6a2fed)
---
 sys/netgraph/bluetooth/hci/ng_hci_evnt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
index b0dae0e18ecf..f144d284aee3 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
@@ -525,6 +525,7 @@ static int le_connection_complete(ng_hci_unit_p unit, struct mbuf *event)
 		if (error != 0) {
 			ng_hci_con_untimeout(con);
 			ng_hci_free_con(con);
+			goto out;
 		}
 
 	} else if ((error = ng_hci_con_untimeout(con)) != 0)


More information about the dev-commits-src-all mailing list