[Tile-serving] [openstreetmap/osm2pgsql] Fix memory leak in Lua-related code (PR #1669)

Jochen Topf notifications at github.com
Fri Apr 22 18:58:16 UTC 2022


This fixes a memory leak of a Lua context. In the process quite some refactoring needed to be done and some more checks on the data osm2pgsql receives from Lua scripts. See the individual commits.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/1669

-- Commit Summary --

  * Function names in Lua tagtransform are not variable, use constants
  * Simplify lua_tagtransform_t::clone() functionality
  * Fix memory leak by using unique_ptr for Lua state
  * Improved check for data we get from the Lua config
  * A bit of code cleanup of Lua tagtransform code

-- File Changes --

    M src/tagtransform-lua.cpp (215)
    M src/tagtransform-lua.hpp (34)
    M src/tagtransform.cpp (3)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/1669.patch
https://github.com/openstreetmap/osm2pgsql/pull/1669.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1669
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/pull/1669 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220422/f0910e94/attachment-0001.htm>


More information about the Tile-serving mailing list