Skip to content

AVRO-4246: [c] Fix memory leak on failed decoding#3732

Open
fabiocfabini wants to merge 3 commits intoapache:mainfrom
fabiocfabini:avro-4246-memory-leak-in-avroc-on-failed-decoding
Open

AVRO-4246: [c] Fix memory leak on failed decoding#3732
fabiocfabini wants to merge 3 commits intoapache:mainfrom
fabiocfabini:avro-4246-memory-leak-in-avroc-on-failed-decoding

Conversation

@fabiocfabini
Copy link
Copy Markdown

What is the purpose of the change

This pull request fixes a memory leak issue with the C SDK. Internal allocated buffer is never released if decoding fails.

Verifying this change

This change added test test_avro_4246.c that:

  • encodes an integer into avro binary.
  • attempts to decode into a string.
  • valgrind catches whether memory as leaked internally.

Documentation

No new features are added.

@github-actions github-actions bot added the C label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant