From 22cc6c5b6a5532e1600dd9e9c071048d4feab283 Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Thu, 5 Dec 2019 14:53:30 +0000 Subject: [PATCH] Fix memory leak in low-level module. The census-event string was not decrefed and we therefore leaked memory. --- _msprimemodule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/_msprimemodule.c b/_msprimemodule.c index 6f384b30f..0ff979e3b 100644 --- a/_msprimemodule.c +++ b/_msprimemodule.c @@ -2861,6 +2861,7 @@ Simulator_parse_demographic_events(Simulator *self, PyObject *py_events) Py_XDECREF(instantaneous_bottleneck_s); Py_XDECREF(initial_size_s); Py_XDECREF(growth_rate_s); + Py_XDECREF(census_event_s); return ret; }