Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
epggrab: fix mutex deadlock on exit, fixes #2939
  • Loading branch information
perexg committed Jun 13, 2015
1 parent 81f8235 commit 5556f70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/epggrab.c
Expand Up @@ -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();
Expand Down

3 comments on commit 5556f70

@ksooo
Copy link
Contributor

@ksooo ksooo commented on 5556f70 Jun 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you apply this one for 4.0.x, please? Running in this with 4.0.4 quite often. Thx.

@perexg
Copy link
Contributor Author

@perexg perexg commented on 5556f70 Jun 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ksooo
Copy link
Contributor

@ksooo ksooo commented on 5556f70 Jun 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Can you say when 4.0.5 will be ready?

Please sign in to comment.