Commit 0d53774
net/barex: erase channelComm entry and free comm on HELLO error paths
Once comm is inserted into e->channelComm[ch], the three HELLO error
paths (AllocBuffer failure, Send sync error, helloFailed) returned
after only deleting st. This leaked the BarexComm and left a dangling
channelComm[ch] -> comm entry that a later OnRecvCall (e.g. a CTS on
this channel) would look up and dereference.
Erase the map entry under e->mu and delete comm before returning on
each path. Reported by Copilot review on PR #526.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 94a424f commit 0d53774
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
604 | 609 | | |
605 | 610 | | |
606 | 611 | | |
| |||
626 | 631 | | |
627 | 632 | | |
628 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
629 | 639 | | |
630 | 640 | | |
631 | 641 | | |
| |||
636 | 646 | | |
637 | 647 | | |
638 | 648 | | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
639 | 654 | | |
640 | 655 | | |
641 | 656 | | |
| |||
0 commit comments