From e67ad89a5ed8066b7f1272b96688da0a5c24c1c5 Mon Sep 17 00:00:00 2001 From: Gord Thompson Date: Mon, 14 Feb 2022 11:31:43 -0700 Subject: [PATCH] Fix memory leak with decimal parameters Fixes: #1026 --- src/params.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/params.cpp b/src/params.cpp index 3fb7471d..23b2557c 100644 --- a/src/params.cpp +++ b/src/params.cpp @@ -566,6 +566,7 @@ static int PyToCType(Cursor *cur, unsigned char **outbuf, PyObject *cell, ParamI Py_XDECREF(args); Py_XDECREF(scaledDecimal); + Py_XDECREF(newDigits); Py_XDECREF(cellParts); pNum->precision = (SQLCHAR)pi->ColumnSize;