On deinit free event base before freeing command base and pipes

This commit is contained in:
chme 2016-05-21 06:48:02 +02:00
parent 6112c38220
commit 5dc1cba5c8
6 changed files with 13 additions and 13 deletions

View File

@ -1723,10 +1723,10 @@ cache_deinit(void)
}
// Free event base (should free events too)
commands_base_free(cmdbase);
event_base_free(evbase_cache);
// Close pipes
// Close pipes and free command base
commands_base_free(cmdbase);
close(g_exit_pipe[0]);
close(g_exit_pipe[1]);
}

View File

@ -2085,8 +2085,8 @@ filescanner_deinit(void)
inofd_event_unset();
event_base_free(evbase_scan);
commands_base_free(cmdbase);
close(exit_pipe[0]);
close(exit_pipe[1]);
commands_base_free(cmdbase);
event_base_free(evbase_scan);
}

View File

@ -4853,8 +4853,6 @@ void mpd_deinit(void)
free(temp);
}
commands_base_free(cmdbase);
http_port = cfg_getint(cfg_getsec(cfg, "mpd"), "http_port");
if (http_port > 0)
evhttp_free(evhttpd);
@ -4864,7 +4862,8 @@ void mpd_deinit(void)
// Free event base (should free events too)
event_base_free(evbase_mpd);
// Close pipes
// Close pipes and free command base
commands_base_free(cmdbase);
close(g_exit_pipe[0]);
close(g_exit_pipe[1]);
}

View File

@ -4183,12 +4183,13 @@ player_deinit(void)
timer_delete(pb_timer);
#endif
commands_base_free(cmdbase);
evbuffer_free(audio_buf);
outputs_deinit();
event_base_free(evbase_player);
commands_base_free(cmdbase);
close(exit_pipe[0]);
close(exit_pipe[1]);
event_base_free(evbase_player);
}

View File

@ -2154,9 +2154,9 @@ spotify_deinit(void)
/* Free event base (should free events too) */
event_base_free(evbase_spotify);
commands_base_free(cmdbase);
/* Close pipes */
/* Close pipes and free command base */
commands_base_free(cmdbase);
close(g_notify_pipe[0]);
close(g_notify_pipe[1]);
close(g_exit_pipe[0]);

View File

@ -279,10 +279,10 @@ worker_deinit(void)
}
// Free event base (should free events too)
commands_base_free(cmdbase);
event_base_free(evbase_worker);
// Close pipes
// Close pipes and free command base
commands_base_free(cmdbase);
close(g_exit_pipe[0]);
close(g_exit_pipe[1]);
}