Skip to content

IPv6ND: Free routeinfo when it expires#670

Merged
rsmarples merged 1 commit into
masterfrom
nd_routeinfo
Jun 22, 2026
Merged

IPv6ND: Free routeinfo when it expires#670
rsmarples merged 1 commit into
masterfrom
nd_routeinfo

Conversation

@rsmarples

Copy link
Copy Markdown
Member

Reported-by: CuB3y0nd root@cubeyond.net

Reported-by: CuB3y0nd <root@cubeyond.net>
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5f4da7d1-162a-4298-9e8e-53aacffb4219

📥 Commits

Reviewing files that changed from the base of the PR and between 78ea09e and 08c57c6.

📒 Files selected for processing (1)
  • src/ipv6nd.c

Walkthrough

A single free(rinfo) call is added in ipv6nd_expirera in src/ipv6nd.c, immediately after TAILQ_REMOVE removes an expired route-information entry from rap->rinfos, fixing a memory leak where the removed structure was never deallocated.

Changes

Route-info expiry memory leak fix

Layer / File(s) Summary
Free rinfo after TAILQ_REMOVE
src/ipv6nd.c
Adds free(rinfo) on line 1817 directly after the TAILQ_REMOVE call that removes an expired rinfo entry, releasing the previously leaked allocation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: freeing routeinfo structures when they expire in IPv6ND.
Description check ✅ Passed The description is related to the changeset, citing the reporter and providing context about the issue being addressed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nd_routeinfo

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rsmarples

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rsmarples rsmarples merged commit 708b4a5 into master Jun 22, 2026
9 checks passed
@rsmarples rsmarples deleted the nd_routeinfo branch June 22, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant