]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
timeshift: Remove redundant (and faulty) code.
authorAdam Sutton <dev@adamsutton.me.uk>
Mon, 3 Dec 2012 14:59:47 +0000 (14:59 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Wed, 9 Jan 2013 21:26:51 +0000 (21:26 +0000)
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
src/timeshift/private.h

index 116575135ac72f937a2a7c3f74c89b239d83cffc..2114442e8a3c8c0e037030abb5649b8d0e1ee580 100644 (file)
@@ -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);
index 455fd93b848acc68d0909332330881cd84f98eff..22022ac14f3b6ae69bc0c343aa34f644592500ba 100644 (file)
@@ -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