Repository navigation
Fix leak of serialized p4info in RPC server state sync - #681
Open
Devansh-567 wants to merge 2 commits into
Open
Devansh-567 wants to merge 2 commits into
Devansh-567 wants to merge 2 commits into
Conversation
Signed-off-by: Devansh-567 <devansh.jay.singh@gmail.com>
fruffy
approved these changes
Oct 18, 2026
Contributor
|
@Devansh-567 Looks like there are conflicts with the proposed changes here, relative to some other PR(s) that were recently merged. |
Signed-off-by: Devansh Singh <devansh.jay.singh@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
this change fixes a memory leak in rpc server state synchronization by freeing the serialized p4info data for each device before releasing the device array. adds a regression test to verify state synchronization when devices are assigned.
description
during rpc server initialization, the serialized p4info data for assigned devices was not freed before the temporary device array was released. this could cause memory leaks when synchronizing device state. this change frees the serialized config for each device and adds a test that checks initialization with no assigned devices, device assignment, and state synchronization for a newly connected client.
scope
testting
added a regression test for rpc server state synchronization, including device assignment and retrieval of the current device state by a new client. test execution remains to be verified.