[GRASS-dev] [GRASS GIS] #273: v.example leaks memory in
db_open_select_cursor
GRASS GIS
trac at osgeo.org
Tue Sep 2 14:53:12 EDT 2008
#273: v.example leaks memory in db_open_select_cursor
---------------------+------------------------------------------------------
Reporter: karme | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: x86-32 |
---------------------+------------------------------------------------------
example valgrind run:
{{{
==8090== 570,258 bytes in 569,794 blocks are definitely lost in loss
record 29 of 31
==8090== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
==8090== by 0x4060670: db_realloc (alloc.c:72)
==8090== by 0x4064B74: db_enlarge_string (string.c:116)
==8090== by 0x406713A: db__recv_string (xdrstring.c:93)
==8090== by 0x4066294: db__recv_column_definition (xdrcolumn.c:29)
==8090== by 0x40675D8: db__recv_table_definition (xdrtable.c:35)
==8090== by 0x40FC4FB: db_open_select_cursor (c_openselect.c:55)
==8090== by 0x80499AC: main (main.c:165)
}}}
The problem is that each call to db_open_select_cursor => each database
query leaks memory.
It seems it doesn't matter which database backend you use.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/273>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list