Skip to content

BUGFIX NID Alloc/Realloc/Dealloc during decode or encode#118

Open
gatekeep wants to merge 1 commit intomasterfrom
fix_nid_array_cleanup
Open

BUGFIX NID Alloc/Realloc/Dealloc during decode or encode#118
gatekeep wants to merge 1 commit intomasterfrom
fix_nid_array_cleanup

Conversation

@gatekeep
Copy link
Member

@gatekeep gatekeep commented Mar 6, 2026

Summary

Simple bug fix to correct a situation where we are alloc or dealloc the NID arrays during a decode or encode.

  • Instead of performing costly memory dealloc and alloc, check if inner NID data array is alloc'ed, clear and rewrite it, if it isn't alloc'ed, alloc it and write it.
  • This will also hopefully correct strange crash conditions when the NAC changes during operation.

Component(s)

Which part(s) of the project does this affect?

  • dvmhost
  • dvmfne
  • dvmbridge
  • dvmpatch
  • dvmcmd
  • sysview
  • tged
  • peered
  • Other (explain below)

Type of change

  • Bug fix
  • Refactor / cleanup
  • Performance improvement
  • Documentation update
  • Build / tooling change

Related issues

N/A

Build & test notes

  • Debian 12
  • GCC 12.2.0

Checklist

  • Change is scoped and focused
  • Existing functionality verified
  • No unrelated refactors included
  • Documentation updated if needed
  • No secrets or credentials included

Notes for maintainers

N/A

… array is alloced, clear and rewrite it, this will also hopefully correct strange crash conditions when the NAC changes during operation;
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