Opened 9 years ago

Closed 8 years ago

#2742 closed defect (fixed)

Possible memory leak in osm2pgsql, osm2pgsql.c, ParseAction

Reported by: rkr Owned by: jburgess777@…
Priority: major Milestone:
Component: utils Version:
Keywords: osm2pgsql, memory leak Cc:

Description

Revision 19148, file: osm2pgsql.c, function: ParseAction?

The allocated variable action is not freed after the call of *action = xmlTextReaderGetAttribute( reader, BAD_CAST "action" );

Possible fix: add before return new_action;

if(action != NULL)

xmlFree(action);

Change History (2)

comment:1 Changed 9 years ago by Tom Hughes

Owner: changed from Tom Hughes to jburgess777@…

comment:2 Changed 8 years ago by rkr

Resolution: fixed
Status: newclosed

Since revision 24099 the appropriate code was moved to parse-primitive.c and xmlTextReaderGetAttribute was replaced by extractAttribute which does not allocate any memory. Therefore the bug can be considered as fixed.

Note: See TracTickets for help on using tickets.