]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
epggrab: fix mutex deadlock on exit, fixes #2939
authorJaroslav Kysela <perex@perex.cz>
Sat, 13 Jun 2015 18:26:59 +0000 (20:26 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sat, 13 Jun 2015 18:27:10 +0000 (20:27 +0200)
src/epggrab.c

index 47c0b18d239699c138ca3db7b4ce2138216d033a..1f33149f1d0a239785b4a6073b33d46a68b3142c 100644 (file)
@@ -405,11 +405,13 @@ void epggrab_done ( void )
   pthread_mutex_lock(&global_lock);
   while ((mod = LIST_FIRST(&epggrab_modules)) != NULL) {
     LIST_REMOVE(mod, link);
+    pthread_mutex_unlock(&global_lock);
     if (mod->done)
       mod->done(mod);
     free((void *)mod->id);
     free((void *)mod->name);
     free(mod);
+    pthread_mutex_lock(&global_lock);
   }
   pthread_mutex_unlock(&global_lock);
   epggrab_ota_shutdown();