Dont ref coord after freeing it

This commit is contained in:
bsudekum
2016-02-08 10:27:25 -08:00
parent e75718ef15
commit efabe72c81
+5 -5
View File
@@ -477,9 +477,9 @@ NSObject *convertObjectToPolyline (NSObject *annotationObject)
count++;
}
}
RCTMGLAnnotationPolyline *polyline = [RCTMGLAnnotationPolyline polylineAnnotation:coord strokeAlpha:strokeAlpha strokeColor:strokeColor strokeWidth:strokeWidth id:id type:@"polyline" count:count];
free(coord);
return [RCTMGLAnnotationPolyline polylineAnnotation:coord strokeAlpha:strokeAlpha strokeColor:strokeColor strokeWidth:strokeWidth id:id type:@"polyline" count:count];
return polyline;
}
NSObject *convertObjectToPolygon (NSObject *annotationObject)
@@ -537,8 +537,8 @@ NSObject *convertObjectToPolygon (NSObject *annotationObject)
count++;
}
}
RCTMGLAnnotationPolygon *polygon = [RCTMGLAnnotationPolygon polygonAnnotation:coord fillAlpha:fillAlpha fillColor:fillColor strokeColor:strokeColor strokeAlpha:strokeAlpha id:id type:@"polygon" count:count];
free(coord);
return [RCTMGLAnnotationPolygon polygonAnnotation:coord fillAlpha:fillAlpha fillColor:fillColor strokeColor:strokeColor strokeAlpha:strokeAlpha id:id type:@"polygon" count:count];
return polygon;
}
@end
@end