From f1c018de8771542b74cd7f95cdc01977182c7f51 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 14 Aug 1997 21:19:13 +0000 Subject: [PATCH] Fixed refcount bug (thank you, Purify and AMK). --- Modules/reopmodule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/reopmodule.c b/Modules/reopmodule.c index 39e6ecea453..f36647e177d 100644 --- a/Modules/reopmodule.c +++ b/Modules/reopmodule.c @@ -700,6 +700,7 @@ reop__expand(self, args) PyObject *r, *tuple, *result; r=PyObject_GetAttrString(match_obj, "group"); tuple=PyTuple_New(1); + Py_INCREF(value); PyTuple_SetItem(tuple, 0, value); result=PyEval_CallObject(r, tuple); Py_DECREF(r); Py_DECREF(tuple);