Skip to content

Conversation

@yuwata
Copy link
Member

@yuwata yuwata commented May 29, 2020

Fixes #15941.

@yuwata yuwata added the network label May 29, 2020
@yuwata yuwata force-pushed the network-fix-double-free-15941 branch from 10443b8 to 0e64e49 Compare May 29, 2020 08:09

stored = ordered_hashmap_get(c->macsec->receive_channels, &c->sci.as_uint64);
if (stored == c)
ordered_hashmap_remove(c->macsec->receive_channels, &c->sci.as_uint64);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, for the regular hashmaps there's hashmap_remove_value() which makes this comparison implicitly. I think we should just add a similar helper call ordered_hashmap_remove_value() and use that here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. PTAL.

@poettering poettering added the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label May 29, 2020
@yuwata yuwata force-pushed the network-fix-double-free-15941 branch from 0e64e49 to 38b84e4 Compare June 1, 2020 03:20
@yuwata yuwata removed the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label Jun 1, 2020
@keszybz keszybz merged commit 0e77fc6 into systemd:master Jun 1, 2020
@yuwata yuwata deleted the network-fix-double-free-15941 branch June 1, 2020 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

networkd seems to crash somewhere in macsec_done

3 participants