[tracker-miners/wip/carlosg/coverity-fixes: 9/28] libtracker-extract: Plug leak
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/coverity-fixes: 9/28] libtracker-extract: Plug leak
- Date: Sun, 24 Oct 2021 11:33:39 +0000 (UTC)
commit 12ce68dc4979103c0ae5b636da335232fece0e1e
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Oct 24 00:34:28 2021 +0200
libtracker-extract: Plug leak
CID: #365653
src/libtracker-extract/tracker-xmp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-extract/tracker-xmp.c b/src/libtracker-extract/tracker-xmp.c
index 65d75ad64..1fdadd125 100644
--- a/src/libtracker-extract/tracker-xmp.c
+++ b/src/libtracker-extract/tracker-xmp.c
@@ -824,8 +824,10 @@ tracker_xmp_new_from_sidecar (GFile *orig_file,
if (!xmp_path)
return NULL;
- if (!g_file_test (xmp_path, G_FILE_TEST_IS_REGULAR))
+ if (!g_file_test (xmp_path, G_FILE_TEST_IS_REGULAR)) {
+ g_free (xmp_path);
return NULL;
+ }
mapped_file = g_mapped_file_new (xmp_path, FALSE, NULL);
if (!mapped_file) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]