Memory leaks in cprocessors DecimalResultProcessor

Issue #1978 resolved
Former user created an issue

There are two memory leaks in the cprocessors DecimalResultProcessor.

One is a missing Py_DECREF in the process method. Also, the DecimalResultProcessor itself lacked a dealloc method to deref the provided type and formatter string.

Tests are included; obviously you have to compile and use the cextensions to really exercise the code. :)

Pullable from https://bitbucket.org/taavi_burns/sqlalchemy .

Comments (8)

  1. Former user Account Deleted

    (original author: ged) Doh! Seems like I didn't check for memleaks after implementing the scale argument... Thanks for the fix.

    Also, the UnicodeResultProcessor suffers from the same small (once per processor) memleak: it needs a dealloc method -- I guess I thought they were optional when I wrote that code. I'll open a ticket for that.

  2. Former user Account Deleted

    (original author: taavi) Yup, it's fixed. Wasn't sure what the ticket closing procedure was at the tie, and just got around to the "what do I do about it" to-do now. ;)

  3. Log in to comment