timeshift: Reworked mutex locking in timeshift_filemgr.c

This commit is contained in:
Joerg Werner 2014-05-11 14:31:27 +02:00
parent 03a69ffec6
commit cd85e6a8bc

View file

@ -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(&timeshift_reaper_lock);
/* Free memory */
while ((ti = TAILQ_FIRST(&tsf->iframes))) {
TAILQ_REMOVE(&tsf->iframes, ti, link);