Files
documentdb/pg_helio_api
Jayanta Mondal e3d4ac5865 Merged PR 1510974: [Engine] Free ErrorData to avoid potential memory leak
### 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`.
2024-11-19 17:25:36 +08:00
..