-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Correct And Simplify Memory Handling in xattr_get #17
Comments
Sorry, noticed an omission in the patch. Update enclosed. |
Hi, Refactoring the way error handling is dome is, I consider, more a matter of taste. I'd like to discuss that separately from fixing an actual bug. Can you rebase and split the patch into bug-fix and rework-error-handling? |
Code quality has nothing to do with “taste” (whatever that might mean). |
Error handling methods, as long as correct, are a matter of style, and not of "quality". I'll fix the PyList_Append error checking, if you do want to send a pull request for the refactoring, please do that separately. |
This fixes the correctness aspect of #17, although not the entire point.
I notice your
xattr_get
routine is missing a check for an error from thePyList_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 thegoto
s. 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
The text was updated successfully, but these errors were encountered: