From e54886960e6a274ba6799854d642e379347c11bd Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Thu, 25 Apr 2019 23:25:19 +0200 Subject: [PATCH] objs is a pointer, and use Py_XDECREF on it. --- src/python.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python.c b/src/python.c index 4e674db..bafdf92 100644 --- a/src/python.c +++ b/src/python.c @@ -3583,7 +3583,7 @@ pykore_pgsql_dealloc(struct pykore_pgsql *pysql) Py_DECREF(pysql->result); for (i = 0; i < pysql->param.count; i++) - Py_DECREF(pysql->param.objs[i]); + Py_XDECREF(pysql->param.objs[i]); kore_free(pysql->param.objs); kore_free(pysql->param.values); @@ -3611,8 +3611,8 @@ pykore_pgsql_alloc(struct http_request *req, const char *db, const char *query, pysql->state = PYKORE_PGSQL_PREINIT; pysql->binary = 0; - pysql->param.objs = 0; pysql->param.count = 0; + pysql->param.objs = NULL; pysql->param.values = NULL; pysql->param.lengths = NULL; pysql->param.formats = NULL;