Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions cairo/pattern.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ _raster_source_release_func (cairo_pattern_t *pattern,
result = NULL;
goto error;
}
Py_DECREF (result);

Py_DECREF (pysurface);
PyGILState_Release (gstate);
Expand Down
3 changes: 2 additions & 1 deletion cairo/surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ surface_set_mime_data (PycairoSurface *o, PyObject *args) {
mime_intern = PyUnicode_InternFromString (mime_type);
surface_capsule = PyCapsule_New(o->surface, NULL, NULL);
view_capsule = PyCapsule_New(view, NULL, NULL);
user_data = Py_BuildValue("(NNOO)", surface_capsule, view_capsule, obj, mime_intern);
user_data = Py_BuildValue("(NNON)", surface_capsule, view_capsule, obj, mime_intern);
if (user_data == NULL) {
PyBuffer_Release (view);
PyMem_Free (view);
Expand Down Expand Up @@ -558,6 +558,7 @@ surface_get_mime_data (PycairoSurface *o, PyObject *args) {
mime_intern = PyUnicode_InternFromString (mime_type);
user_data = cairo_surface_get_user_data(
o->surface, (cairo_user_data_key_t *)mime_intern);
Py_DECREF(mime_intern);

if (user_data == NULL) {
/* In case the mime data wasn't set through the Python API just copy it */
Expand Down
Loading