Azure / azure-uamqp-python

AMQP 1.0 client library for Python
MIT License
56 stars 48 forks source link

fix mem leak in converting amqp value into string #269

Closed yunhaoling closed 2 years ago

yunhaoling commented 2 years ago

amqpvalue_to_string will malloc memory for the string, we should free the c allocated memory after usage.

according to cython, https://cython.readthedocs.io/en/latest/src/tutorial/strings.html, we could copy the c string into python string first, then we should be able to safely free the c string and let python take over the life management of the python string.

yunhaoling commented 2 years ago

/azp run python - uamqp - tests

azure-pipelines[bot] commented 2 years ago
No pipelines are associated with this pull request.
yunhaoling commented 2 years ago

/azp run azure-uamqp-python - all-tests

azure-pipelines[bot] commented 2 years ago
No pipelines are associated with this pull request.