Skip to content

Commit

Permalink
msOGRShapeFromWKT(): fix memleak in error code path
Browse files Browse the repository at this point in the history
Likely fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52223
(couldn't reproduce the leak with the reproducer and current main, but
this commit does fix a leak)
  • Loading branch information
rouault authored and github-actions[bot] committed Oct 9, 2022
1 parent 2721264 commit ee04ff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mapogr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5485,7 +5485,7 @@ shapeObj *msOGRShapeFromWKT(const char *string)
wkbFlatten(OGR_G_GetGeometryType(hGeom)) )
== MS_FAILURE ) {
free( shape );
return NULL;
shape = NULL;
}

OGR_G_DestroyGeometry( hGeom );
Expand Down

0 comments on commit ee04ff3

Please sign in to comment.