From 57100c1912459cd6dbae7d1b83146d490c5f960c Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Wed, 15 Jun 2011 00:42:41 -0400 Subject: [PATCH] fix small bug when parent option merging fails --- src/rendermodes.c | 1 + 1 file changed, 1 insertion(+) 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; }