[pdal-commits] [PDAL/PDAL] 88dc6d: GeotiffSrs constructor: fix memleak of GTIFGetOGIS...

GitHub noreply at github.com
Sat Apr 21 20:10:46 PDT 2018


  Branch: refs/heads/master
  Home:   https://github.com/PDAL/PDAL
  Commit: 88dc6db3a50fce7685f468bef4665433765f4469
      https://github.com/PDAL/PDAL/commit/88dc6db3a50fce7685f468bef4665433765f4469
  Author: Even Rouault <even.rouault at mines-paris.org>
  Date:   2018-04-21 (Sat, 21 Apr 2018)

  Changed paths:
    M io/GeotiffSupport.cpp

  Log Message:
  -----------
  GeotiffSrs constructor: fix memleak of GTIFGetOGISDefn() return (#1949)

This fixes the following Valgrind warning on pdal_filters_reprojection_test

==22366== 1,282 bytes in 2 blocks are definitely lost in loss record 675 of 701
==22366==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22366==    by 0x7DE5D24: VSIMalloc (cpl_vsisimple.cpp:557)
==22366==    by 0x7D136F5: CPLMalloc (cpl_conv.cpp:184)
==22366==    by 0x8737AD8: OGR_SRSNode::exportToWkt(char**) const (ogr_srsnode.cpp:466)
==22366==    by 0x8724742: OGRSpatialReference::exportToWkt(char**) const (ogrspatialreference.cpp:737)
==22366==    by 0x75C8C4B: GTIFGetOGISDefn (gt_wkt_srs.cpp:1356)
==22366==    by 0x5696FA9: pdal::GeotiffSrs::GeotiffSrs(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, std::shared_ptr<pdal::Log>) (GeotiffSupport.cpp:149)
==22366==    by 0x56B3C3B: pdal::LasHeader::setSrsFromGeotiff() (LasHeader.cpp:322)
==22366==    by 0x56B3243: pdal::LasHeader::setSrs() (LasHeader.cpp:219)
==22366==    by 0x56B468F: pdal::operator>>(pdal::ILeStream&, pdal::LasHeader&) (LasHeader.cpp:404)
==22366==    by 0x5680FF4: pdal::LasReader::initializeLocal(pdal::BasePointTable&, pdal::MetadataNode&) (LasReader.cpp:192)
==22366==    by 0x568972E: pdal::LasReader::initialize(pdal::BasePointTable&) (LasReader.hpp:134)




More information about the pdal-commits mailing list