Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jun 2021 05:22:06 GMT
From:      Takanori Watanabe <takawata@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 26c3e7a1ecb3 - stable/13 - Fix a use-after-free in an error case.
Message-ID:  <202106090522.1595M64K078878@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by takawata:

URL: https://cgit.FreeBSD.org/src/commit/?id=26c3e7a1ecb375de071786a07bdd68f867acdb3c

commit 26c3e7a1ecb375de071786a07bdd68f867acdb3c
Author:     Takanori Watanabe <takawata@FreeBSD.org>
AuthorDate: 2021-05-26 09:23:33 +0000
Commit:     Takanori Watanabe <takawata@FreeBSD.org>
CommitDate: 2021-06-09 05:20:57 +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 9e299d12fd1e..64ab4f0b36b9 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
@@ -528,6 +528,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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106090522.1595M64K078878>