[tracker-miners/tracker-miners-2.3: 1/5] miners/fs: Avoid possible NULL pointer reference
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/tracker-miners-2.3: 1/5] miners/fs: Avoid possible NULL pointer reference
- Date: Thu, 5 Dec 2019 23:32:48 +0000 (UTC)
commit e4d5383da59b3198a7156c9c344ded4e0fbe04d5
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Dec 1 21:41:14 2019 +0100
miners/fs: Avoid possible NULL pointer reference
If we hit an issue during miner_files_initable_init() then the
extract_watchdog instance may never be created.
src/miners/fs/tracker-miner-files.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 7d7c1d97e..52dbf25ce 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -907,10 +907,12 @@ miner_files_finalize (GObject *object)
priv->grace_period_timeout_id = 0;
}
- g_signal_handlers_disconnect_by_func (priv->extract_watchdog,
- on_extractor_lost,
- NULL);
- g_clear_object (&priv->extract_watchdog);
+ if (priv->extract_watchdog) {
+ g_signal_handlers_disconnect_by_func (priv->extract_watchdog,
+ on_extractor_lost,
+ NULL);
+ g_clear_object (&priv->extract_watchdog);
+ }
if (priv->config) {
g_signal_handlers_disconnect_by_func (priv->config,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]