Fixed: Memleak in Repository_config__get__()

There was a memleak because of a missing Py_INCREF() for self->config. We need 2 Py_INCREF() here
because one is returned and one is kept internally. Thanks @delanne for reporting and providing
the patch.
This commit is contained in:
Nico von Geyso
2013-05-21 14:06:44 +02:00
parent 7bccfc8d26
commit b50a8d05fe

View File

@@ -497,6 +497,9 @@ Repository_config__get__(Repository *self)
py_config->config = config;
self->config = (PyObject*)py_config;
// We need 2 refs here.
// One is returned, one is keep internally.
Py_INCREF(self->config);
} else {
Py_INCREF(self->config);
}