Skip to content

fix: free data.values in rehash() to avoid memory leak - #132556

Open
savoptik wants to merge 1 commit into
dotnet:mainfrom
savoptik:savoptik/pr-2
Open

fix: free data.values in rehash() to avoid memory leak#132556
savoptik wants to merge 1 commit into
dotnet:mainfrom
savoptik:savoptik/pr-2

Conversation

@savoptik

Copy link
Copy Markdown

Memory allocated for data.values was never freed, which could lead to memory accumulation and eventually cause OOM and a process crash.

Add a g_free(data.values) call in rehash() to properly release the memory.

Found by Linux Verification Center (linuxtesting.org) with SVACE. .
Signed-off-by: Artem Semenov savoptik@altlinux.org.

Memory allocated for data.values was never freed, which could lead to
memory accumulation and eventually cause OOM and a process crash.
Add a g_free(data.values) call in rehash() to properly release the memory.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Artem Semenov <savoptik@altlinux.org>.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@savoptik