Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
MNT: let weakref errors propogate up and out
  • Loading branch information
tacaswell committed Feb 6, 2026
commit 434b7b56cd1af3f511994f5c74bec481b0bf77fa
8 changes: 7 additions & 1 deletion src/share.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ share_cleanup_and_count_live_easies(CurlShareObject *self)
// return -1 on error, 0 on dead object
// in either case, mark as removable and
// move to the next reference
if (rc < 1 || obj == NULL) {
if (rc < 0) {
Py_DECREF(wr);
return -1;
} else if (rc == 0 || obj == NULL) {
PyList_Append(to_remove, wr);
Py_DECREF(wr);
continue;
Expand Down Expand Up @@ -350,6 +353,9 @@ do_share_close(CurlShareObject *self, PyObject *Py_UNUSED(ignored))
(nlive == 1 ? "" : "s")
);
return NULL;
} else if (nlive < 0) {
// Error in share_cleanup_and_count_live_easies, propagate up
return NULL;
}

util_share_close(self);
Expand Down