From cd85e6a8bcb2a08d93fe5b3fd0af67e69a984a89 Mon Sep 17 00:00:00 2001 From: Joerg Werner Date: Sun, 11 May 2014 14:31:27 +0200 Subject: [PATCH] timeshift: Reworked mutex locking in timeshift_filemgr.c --- src/timeshift/timeshift_filemgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/timeshift/timeshift_filemgr.c b/src/timeshift/timeshift_filemgr.c index ee6ebcc9..d33be281 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);