From: SourceForge.net <no...@so...> - 2004-08-03 22:17:29
|
in pgnotify.c Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Bugs item #1001593, was opened at 2004-08-01 14:46 Message generated for change (Comment added) made by ballie01 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=1001593&group_id=16528 Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Hallvard B Furuseth (hfuru) >Assigned to: Billy G. Allie (ballie01) >Summary: Bad free() in pgnotify.c Initial Comment: pgnotify.c 1.8 contains `free(note);', but there is no malloc(), calloc() etc anywhere in pypgsql. I don't know how pgnotify is used, but I imagine PyMalloc will break this, and the free() should be PyMem_Free(), PyObject_Free() or PyObject_Del(). ---------------------------------------------------------------------- >Comment By: Billy G. Allie (ballie01) Date: 2004-08-03 18:17 Message: Logged In: YES user_id=8500 No, the free() is valid. The PgNotify_New() function is passed a structure allocated by PostgreSQL's libpq library and needs to be freed after use. PostgreSQL added a PQfreemem() function for compatability with windows, so I will modify the code to use PQfreemem (which is just a call to free() in the linux/unix workd) instead of free(). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=1001593&group_id=16528 |