Skip to content

Commit a9d1ab4

Browse files
committed
ximgproc: fix some mismatched new / free calls
1 parent d17e2ab commit a9d1ab4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/ximgproc/src/graphsegmentation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ namespace cv {
244244
}
245245
}
246246

247-
free(thresholds);
247+
delete [] thresholds;
248248
}
249249

250250
void GraphSegmentationImpl::filterSmallAreas(Edge *edges, const int &nb_edges, PointSet *es) {
@@ -300,7 +300,7 @@ namespace cv {
300300
}
301301
}
302302

303-
free(mapped_id);
303+
delete [] mapped_id;
304304
}
305305

306306
void GraphSegmentationImpl::processImage(InputArray src, OutputArray dst) {
@@ -332,7 +332,7 @@ namespace cv {
332332
// Map to final output
333333
finalMapping(es, output);
334334

335-
free(edges);
335+
delete [] edges;
336336
delete es;
337337

338338
}
@@ -359,7 +359,7 @@ namespace cv {
359359
}
360360

361361
PointSet::~PointSet() {
362-
free(mapping);
362+
delete [] mapping;
363363
}
364364

365365
int PointSet::getBasePoint( int p) {

0 commit comments

Comments
 (0)