---
scribo/ChangeLog | 4 ++++
scribo/scribo/text/recognition.hh | 15 +++++----------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index cfd40df..4574778 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,9 @@
2011-01-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * scribo/text/recognition.hh: Fix invalid free().
+
+2011-01-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
* scribo/io/xml/save.hh: Handle paragraphs and separators correctly
in XML output.
diff --git a/scribo/scribo/text/recognition.hh b/scribo/scribo/text/recognition.hh
index 8b243bd..7a72ee4 100644
--- a/scribo/scribo/text/recognition.hh
+++ b/scribo/scribo/text/recognition.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -118,15 +118,10 @@ namespace scribo
abort();
}
tess.SetPageSegMode(tesseract::PSM_SINGLE_LINE);
+
# endif // HAVE_TESSERACT_2
typedef mln_ch_value(L,bool) I;
- int vals[] = { 0, 9, 0, 9, 0,
- 9, 6, 4, 6, 9,
- 0, 4, 0, 4, 0,
- 9, 6, 4, 6, 9,
- 0, 9, 0, 9, 0 };
- w_window2d_int dmap_win = mln::make::w_window2d_int(vals);
/// Use text bboxes with Tesseract
@@ -203,7 +198,7 @@ namespace scribo
}
// The string has been allocated by Tesseract. It must be released.
- free(s);
+ delete [] s;
}
trace::exiting("scribo::text::recognition");
@@ -289,7 +284,7 @@ namespace scribo
}
// The string has been allocated by Tesseract. We must free it.
- free(s);
+ delete [] s;
if (!output_file.empty())
file.close();
--
1.5.6.5
Show replies by date