Skip to content

Commit

Permalink
Merge pull request #6716 from MapServer/backport-6715-to-branch-7-6
Browse files Browse the repository at this point in the history
[Backport branch-7-6] msOGRShapeFromWKT(): fix memory leak in error code path
  • Loading branch information
rouault committed Oct 13, 2022
2 parents f14482e + a23fee7 commit aafd36d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mapogr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5484,6 +5484,7 @@ shapeObj *msOGRShapeFromWKT(const char *string)
if( msOGRGeometryToShape( hGeom, shape,
wkbFlatten(OGR_G_GetGeometryType(hGeom)) )
== MS_FAILURE ) {
msFreeShape(shape);
free( shape );
shape = NULL;
}
Expand Down

0 comments on commit aafd36d

Please sign in to comment.