Skip to content

Correct And Simplify Memory Handling in xattr_get #17

@ldo

Description

@ldo

I notice your xattr_get routine is missing a check for an error from the PyList_Append call.

While I was at it, I took the opportunity to rework the xattr_get logic to reduce the complexity of the control paths, eliminating all the gotos. As you can see from the enclosed patch, it becomes much easier to verify that everything will be be correctly disposed regardless of what errors might occur.

ldo-xattr_get.patch.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions