Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Possible memory leak in osm2pgsql, osm2pgsql.c, ParseAction #2742

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: rkr
[Submitted to the original trac issue database at 11.31am, Wednesday, 24th February 2010]

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);

@openstreetmap-trac
Copy link
Author

Author: rkr
[Added to the original trac issue at 8.09am, Saturday, 23rd April 2011]

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant