diff --git a/src/rendermodes.c b/src/rendermodes.c index 77a9196..29c506e 100644 --- a/src/rendermodes.c +++ b/src/rendermodes.c @@ -80,6 +80,7 @@ render_mode_create_options(const char *mode) { parent_options = render_mode_create_options(parent); if (parent_options) { if (PyDict_Merge(ret, parent_options, 0) == -1) { + Py_DECREF(ret); Py_DECREF(parent_options); return NULL; }