- #4388, AddRasterConstraints: Ignore NULLs when generating constraints (Raúl Marín)
- #4327, Avoid pfree'ing the result of getenv (Raúl Marín)
- #4406, Throw on invalid characters when decoding geohash (Raúl Marín)
+ - #4372, Avoid resource leaks with PROJ6 (Raúl Marín)
PostGIS 3.0.0alpha1
2019/05/26
if (!pj)
{
PJ *pj_in = proj_create(NULL, instr);
- PJ *pj_out = proj_create(NULL, outstr);
if (!pj_in)
{
lwerror("could not parse proj string '%s'", instr);
}
+ proj_destroy(pj_in);
+
+ PJ *pj_out = proj_create(NULL, outstr);
if (!pj_out)
{
- proj_destroy(pj_in);
lwerror("could not parse proj string '%s'", outstr);
}
+ proj_destroy(pj_out);
+ lwerror("%s: Failed to transform", __func__);
return LW_FAILURE;
}
- return lwgeom_transform(geom, pj);
+ int ret = lwgeom_transform(geom, pj);
+ proj_destroy(pj);
+
+ return ret;
}
int