diff options
author | emax <emax@FreeBSD.org> | 2008-08-01 00:13:32 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2008-08-01 00:13:32 +0000 |
commit | 8ea609367b09b138e1d44575c81002fce24983fc (patch) | |
tree | 2a47f721165af83cea904de92d25ac7aa95e8ceb /sys/netgraph/bluetooth | |
parent | a0701212a1281371c64713ed8a031b01a5ccb516 (diff) | |
download | FreeBSD-src-8ea609367b09b138e1d44575c81002fce24983fc.zip FreeBSD-src-8ea609367b09b138e1d44575c81002fce24983fc.tar.gz |
Fix locking bug, i.e. lock "wildcard" matched pcb before return.
Diffstat (limited to 'sys/netgraph/bluetooth')
-rw-r--r-- | sys/netgraph/bluetooth/socket/ng_btsocket_sco.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c index 88ea8e0..3b4c109 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c @@ -1832,6 +1832,9 @@ ng_btsocket_sco_pcb_by_addr(bdaddr_p bdaddr) mtx_unlock(&p->pcb_mtx); } + if (p1 != NULL) + mtx_lock(&p1->pcb_mtx); + return (p1); } /* ng_btsocket_sco_pcb_by_addr */ |