[tracker/tracker-0.10] tracker-extract-pdf: Fix file descriptor leak in error cases
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] tracker-extract-pdf: Fix file descriptor leak in error cases
- Date: Thu, 6 Oct 2011 16:43:51 +0000 (UTC)
commit b1ddae8d2313303f252a279847b4cf90df942dd3
Author: JÃrg Billeter <j bitron ch>
Date: Tue Sep 27 16:46:44 2011 +0200
tracker-extract-pdf: Fix file descriptor leak in error cases
src/tracker-extract/tracker-extract-pdf.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-pdf.c b/src/tracker-extract/tracker-extract-pdf.c
index 04052da..c4a1f5c 100644
--- a/src/tracker-extract/tracker-extract-pdf.c
+++ b/src/tracker-extract/tracker-extract-pdf.c
@@ -362,13 +362,13 @@ extract_pdf (const gchar *uri,
tracker_sparql_builder_predicate (metadata, "nfo:isContentEncrypted");
tracker_sparql_builder_object_boolean (metadata, TRUE);
- return;
} else {
g_warning ("Couldn't create PopplerDocument from uri:'%s', %s",
uri,
error->message ? error->message : "no error given");
}
+ close (fd);
g_error_free (error);
return;
}
@@ -377,6 +377,7 @@ extract_pdf (const gchar *uri,
g_warning ("Could not create PopplerDocument from uri:'%s', "
"NULL returned without an error",
uri);
+ close (fd);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]