Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak on encoding errors when the buffer was resized #549

Merged

Commits on Jun 4, 2022

  1. Fix memory leak on encoding errors when the buffer was resized

    `JSON_EncodeObject` returns `NULL` when an error occurs, but without freeing the buffer. This leads to a memory leak when the buffer is internally allocated (because the caller's buffer was insufficient or none was provided at all) and any error occurs. Similarly, `objToJSON` did not clean up the buffer in all error conditions either.
    
    This adds the missing buffer free in `JSON_EncodeObject` (iff the buffer was allocated internally) and refactors the error handling in `objToJSON` slightly to also free the buffer when a Python exception occurred without the encoder's `errorMsg` being set.
    JustAnotherArchivist committed Jun 4, 2022
    Copy the full SHA
    666d159 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. Copy the full SHA
    5013dd4 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    1a24de5 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2022

  1. Call the right Python executable

    Co-authored-by: Brénainn Woodsend <bwoodsend@gmail.com>
    JustAnotherArchivist and bwoodsend committed Jun 10, 2022
    Copy the full SHA
    a646c42 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2022

  1. Copy the full SHA
    e84bbde View commit details
    Browse the repository at this point in the history