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);