Fix a crash

This commit is contained in:
Matthias Clasen 2014-12-10 14:33:09 -05:00
parent 639b2193a0
commit d7ba76d58d
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From ae24f17b6b8251a6359dba9b638847cb0f1f16a1 Mon Sep 17 00:00:00 2001
From: Martyn Russell <martyn@lanedo.com>
Date: Wed, 10 Dec 2014 09:35:34 +0000
Subject: [PATCH] tracker-extract: Don't crash if g_file_make_symbolic_link()
fails with no GError
We assume error is set, but in some cases it is not. Check before using it.
https://bugzilla.gnome.org/show_bug.cgi?id=741141
https://bugzilla.redhat.com/show_bug.cgi?id=1133042
---
src/tracker-extract/tracker-extract-persistence.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tracker-extract/tracker-extract-persistence.c b/src/tracker-extract/tracker-extract-persistence.c
index 38bdd35..ee9ebf1 100644
--- a/src/tracker-extract/tracker-extract-persistence.c
+++ b/src/tracker-extract/tracker-extract-persistence.c
@@ -144,8 +144,8 @@ persistence_store_file (TrackerExtractPersistence *persistence,
if (!success) {
g_warning ("Could not save '%s' into failsafe persistence store: %s",
- path, error->message);
- g_error_free (error);
+ path, error ? error->message : "no error given");
+ g_clear_error (&error);
}
g_object_unref (link_file);
--
2.1.0

View File

@ -16,7 +16,7 @@
Name: tracker Name: tracker
Version: 1.3.1 Version: 1.3.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: Desktop-neutral search tool and indexer Summary: Desktop-neutral search tool and indexer
Group: Applications/System Group: Applications/System
@ -27,6 +27,8 @@ Source0: https://download.gnome.org/sources/%{name}/1.3/%{name}-%{version
# only autostart in Gnome, see also # only autostart in Gnome, see also
# https://bugzilla.redhat.com/show_bug.cgi?id=771601 # https://bugzilla.redhat.com/show_bug.cgi?id=771601
Patch0: 0001-Only-autostart-in-GNOME-771601.patch Patch0: 0001-Only-autostart-in-GNOME-771601.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1133042
Patch1: 0001-tracker-extract-Don-t-crash-if-g_file_make_symbolic_.patch
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: firefox BuildRequires: firefox
@ -172,6 +174,7 @@ This package contains the documentation for tracker
%setup -q %setup -q
%patch0 -p1 -b .autostart-gnome %patch0 -p1 -b .autostart-gnome
%patch1 -p1 -b .crash
## nuke unwanted rpaths, see also ## nuke unwanted rpaths, see also
## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath ## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
@ -317,6 +320,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog %changelog
* Wed Dec 10 2014 Matthias Clasen <mclasen@redhat.com> - 1.3.1-2
- Fix a crash (#1133042)
* Wed Dec 03 2014 Kalev Lember <kalevlember@gmail.com> - 1.3.1-1 * Wed Dec 03 2014 Kalev Lember <kalevlember@gmail.com> - 1.3.1-1
- Update to 1.3.1 - Update to 1.3.1