[tracker] tracker-extract: PDF extractor, fixed memory problem
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: PDF extractor, fixed memory problem
- Date: Thu, 13 May 2010 13:34:07 +0000 (UTC)
commit 113e2354435f82ca127ae72d588db08653862b1a
Author: Philip Van Hoof <philip codeminded be>
Date: Thu May 13 15:32:45 2010 +0200
tracker-extract: PDF extractor, fixed memory problem
src/tracker-extract/tracker-extract-pdf.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-pdf.cpp b/src/tracker-extract/tracker-extract-pdf.cpp
index 8bac863..2f206c5 100644
--- a/src/tracker-extract/tracker-extract-pdf.cpp
+++ b/src/tracker-extract/tracker-extract-pdf.cpp
@@ -501,7 +501,6 @@ extract_pdf (const gchar *uri,
PDFDoc *document;
gchar *content;
guint n_words;
- gchar *creation_date = NULL;
Object obj;
Catalog *catalog;
@@ -550,13 +549,15 @@ extract_pdf (const gchar *uri,
document->getDocInfo (&obj);
if (obj.isDict ()) {
+ gchar *creation_date;
Dict *info_dict = obj.getDict();
pd.title = info_dict_get_string (info_dict, "Title");
pd.author = info_dict_get_string (info_dict, "Author");
pd.subject = info_dict_get_string (info_dict, "Subject");
pd.keywords = info_dict_get_string (info_dict, "Keywords");
- creation_date = tracker_date_guess (info_dict_get_string (info_dict, "CreationDate"));
- pd.creation_date = creation_date;
+ creation_date = info_dict_get_string (info_dict, "CreationDate");
+ pd.creation_date = tracker_date_guess (creation_date);
+ g_free (creation_date);
}
obj.free ();
@@ -797,7 +798,6 @@ extract_pdf (const gchar *uri,
read_outline (document, metadata);
- g_free (creation_date);
delete document;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]