Ticket #12101: gdal_leak_fix.diff

File gdal_leak_fix.diff, 633 bytes (added by jbronn, 6 years ago)

Fixes memory leak when assigning SpatialReference to OGRGeometry

  • django/contrib/gis/gdal/geometries.py

     
    260260            srs_ptr = srs_api.clone_srs(srs.ptr)
    261261        elif isinstance(srs, (int, long, basestring)):
    262262            sr = SpatialReference(srs)
    263             srs_ptr = srs_api.clone_srs(sr.ptr)
     263            srs_ptr = sr.ptr
    264264        else:
    265265            raise TypeError('Cannot assign spatial reference with object of type: %s' % type(srs))
    266266        capi.assign_srs(self.ptr, srs_ptr)
Back to Top