This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository gdal.
commit f16a4b6ca75750ea4c5b2e54de1cc6595fc7aced Author: Bas Couwenberg <sebas...@xs4all.nl> Date: Tue Mar 8 22:51:13 2016 +0100 Add patch to fix segfault when exiting with proper closing of datasource. --- debian/changelog | 7 +++ .../ogr-vrt-implement-CloseDependantDataset.patch | 60 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 68 insertions(+) diff --git a/debian/changelog b/debian/changelog index 344b2a9..b599237 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +gdal (2.0.2+dfsg-3) UNRELEASED; urgency=medium + + * Add patch to fix segfault when exiting with proper closing of datasource. + (closes: #817146) + + -- Bas Couwenberg <sebas...@debian.org> Tue, 08 Mar 2016 22:50:58 +0100 + gdal (2.0.2+dfsg-2) unstable; urgency=medium * Fix gdal-abi dependency for mips64el symbols. diff --git a/debian/patches/ogr-vrt-implement-CloseDependantDataset.patch b/debian/patches/ogr-vrt-implement-CloseDependantDataset.patch new file mode 100644 index 0000000..4c24f85 --- /dev/null +++ b/debian/patches/ogr-vrt-implement-CloseDependantDataset.patch @@ -0,0 +1,60 @@ +Description: OGR_VRT: implement CloseDependantDataset?() so that exiting with proper closing of datasource doesn't crash. +Author: Even Rouault <even dot rouault at spatialys dot com> +Origin: https://trac.osgeo.org/gdal/changeset/33684 +Bug: https://trac.osgeo.org/gdal/ticket/6408 +Bug-Debian: https://bugs.debian.org/817146 + +--- a/ogr/ogrsf_frmts/vrt/ogr_vrt.h ++++ b/ogr/ogrsf_frmts/vrt/ogr_vrt.h +@@ -241,6 +241,8 @@ class OGRVRTDataSource : public OGRDataS + OGRVRTDataSource(GDALDriver* poDriver); + ~OGRVRTDataSource(); + ++ virtual int CloseDependentDatasets(); ++ + OGRLayer* InstanciateLayer(CPLXMLNode *psLTree, + const char *pszVRTDirectory, + int bUpdate, +--- a/ogr/ogrsf_frmts/vrt/ogrvrtdatasource.cpp ++++ b/ogr/ogrsf_frmts/vrt/ogrvrtdatasource.cpp +@@ -120,14 +120,10 @@ OGRVRTDataSource::OGRVRTDataSource(GDALD + OGRVRTDataSource::~OGRVRTDataSource() + + { +- int i; +- + CPLFree( pszName ); + +- for( i = 0; i < nLayers; i++ ) +- delete papoLayers[i]; +- +- CPLFree( papoLayers ); ++ CloseDependentDatasets(); ++ + CPLFree( paeLayerType ); + + if( psTree != NULL) +@@ -137,6 +133,23 @@ OGRVRTDataSource::~OGRVRTDataSource() + } + + /************************************************************************/ ++/* CloseDependentDatasets() */ ++/************************************************************************/ ++ ++int OGRVRTDataSource::CloseDependentDatasets() ++{ ++ int bHasClosedDependentDatasets = (nLayers > 0); ++ for( int i = 0; i < nLayers; i++ ) ++ { ++ delete papoLayers[i]; ++ } ++ CPLFree( papoLayers ); ++ nLayers = 0; ++ papoLayers = NULL; ++ return bHasClosedDependentDatasets; ++} ++ ++/************************************************************************/ + /* InstanciateWarpedLayer() */ + /************************************************************************/ + diff --git a/debian/patches/series b/debian/patches/series index 2bd45c1..3a30d79 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -20,3 +20,4 @@ transform-typo.patch sqlite-3.10.0 formatted-typo.patch remaining-typo.patch +ogr-vrt-implement-CloseDependantDataset.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/gdal.git _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel