mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Memory leak ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) N/A ### Description Freeing copy of ErrorData objects after error message has been written into a palloced Response object. We discovered this while investigating postgres crash caused by _S_TEMP_STR_ workload. The crash was solved by this: https://msdata.visualstudio.com/CosmosDB/_git/pgmongo/pullrequest/1497598 ---- #### AI description (iteration 1) #### PR Classification Bug fix #### PR Summary Fixes a memory leak issue by ensuring error data is properly freed after use. - `src/commands/update.c`: Added `FreeErrorData(errorData)` to free error data after appending to `batchResult->writeErrors`.