[tracker-miners/wip/carlosg/coverity-fixes: 5/28] tracker-extract: Delay freeing up task
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/coverity-fixes: 5/28] tracker-extract: Delay freeing up task
- Date: Sun, 24 Oct 2021 11:33:39 +0000 (UTC)
commit 91cbc4a8b2293a64eccc00387d7a7848df9a6fb9
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Oct 24 00:14:15 2021 +0200
tracker-extract: Delay freeing up task
The task is being used in the statistics debug output, so free
it altogether after that.
CID: #365649
src/tracker-extract/tracker-extract.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract.c b/src/tracker-extract/tracker-extract.c
index 29c5df384..c44a76a2f 100644
--- a/src/tracker-extract/tracker-extract.c
+++ b/src/tracker-extract/tracker-extract.c
@@ -499,7 +499,6 @@ get_metadata (TrackerExtractTask *task)
get_file_metadata (task, &info, &error)) {
g_task_return_pointer (G_TASK (task->res), info,
(GDestroyNotify) tracker_extract_info_unref);
- extract_task_free (task);
} else {
if (error) {
g_task_return_error (G_TASK (task->res), error);
@@ -510,8 +509,6 @@ get_metadata (TrackerExtractTask *task)
"Could not get any metadata for uri:'%s' and mime:'%s'",
task->file, task->mimetype);
}
-
- extract_task_free (task);
}
#ifdef G_ENABLE_DEBUG
@@ -524,6 +521,8 @@ get_metadata (TrackerExtractTask *task)
}
#endif
+ extract_task_free (task);
+
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]