Merge pull request #2178 from olt/proj48-double-free-fix

prevent double-free in mapnik::projection
This commit is contained in:
Dane Springmeyer 2014-03-08 19:44:57 -08:00
commit d4662005fe

View file

@ -108,7 +108,10 @@ void projection::init_proj4() const
proj_ = pj_init_plus_ctx(proj_ctx_, params_.c_str());
if (!proj_)
{
if (proj_ctx_) pj_ctx_free(proj_ctx_);
if (proj_ctx_) {
pj_ctx_free(proj_ctx_);
proj_ctx_ = 0;
}
throw proj_init_error(params_);
}
#else