From 869f95ee0f93c90d2382550678b82cddecb0126f Mon Sep 17 00:00:00 2001
From: Adam Sutton <dev@adamsutton.me.uk>
Date: Mon, 3 Dec 2012 14:59:47 +0000
Subject: [PATCH] timeshift: Remove redundant (and faulty) code.

This appears to have been left in place from an older implementation. Ultimately the call to pthread_join will operate on uninit'd memory and could in certain circumstances cause a crash.

Thanks goes to Seri Al-Najjar <salnajjar@gmail.com> for spotting this.
---
 src/timeshift.c         | 1 -
 src/timeshift/private.h | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/src/timeshift.c b/src/timeshift.c
index 11657513..2114442e 100644
--- a/src/timeshift.c
+++ b/src/timeshift.c
@@ -126,7 +126,6 @@ timeshift_destroy(streaming_target_t *pad)
   /* Wait for all threads */
   pthread_join(ts->rd_thread, NULL);
   pthread_join(ts->wr_thread, NULL);
-  pthread_join(ts->rm_thread, NULL);
 
   /* Shut stuff down */
   streaming_queue_deinit(&ts->wr_queue);
diff --git a/src/timeshift/private.h b/src/timeshift/private.h
index 455fd93b..22022ac1 100644
--- a/src/timeshift/private.h
+++ b/src/timeshift/private.h
@@ -88,9 +88,6 @@ typedef struct timeshift {
   pthread_t                   rd_thread;  ///< Reader thread
   th_pipe_t                   rd_pipe;    ///< Message passing to reader
 
-  pthread_t                   rm_thread;  ///< Reaper thread
-  timeshift_file_list_t       rm_list;    ///< Remove files
-
   pthread_mutex_t             rdwr_mutex; ///< Buffer protection
   timeshift_file_list_t       files;      ///< List of files