From: Joerg Werner Date: Sun, 11 May 2014 12:31:27 +0000 (+0200) Subject: timeshift: Reworked mutex locking in timeshift_filemgr.c X-Git-Tag: v4.1~2076^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd85e6a8bcb2a08d93fe5b3fd0af67e69a984a89;p=thirdparty%2Ftvheadend.git timeshift: Reworked mutex locking in timeshift_filemgr.c --- diff --git a/src/timeshift/timeshift_filemgr.c b/src/timeshift/timeshift_filemgr.c index ee6ebcc97..d33be2810 100644 --- a/src/timeshift/timeshift_filemgr.c +++ b/src/timeshift/timeshift_filemgr.c @@ -73,6 +73,8 @@ static void* timeshift_reaper_callback ( void *p ) tvhlog(LOG_ERR, "timeshift", "failed to remove %s [e=%s]", dpath, strerror(errno)); + pthread_mutex_lock(×hift_reaper_lock); + /* Free memory */ while ((ti = TAILQ_FIRST(&tsf->iframes))) { TAILQ_REMOVE(&tsf->iframes, ti, link);