2
0
Fork 0

fix mem leak in stat_cache_free()

personal/stbuehler/wip
Thomas Porzelt 2009-03-06 18:50:03 +01:00
parent 30ff4619fa
commit a01815421c
1 changed files with 4 additions and 1 deletions

View File

@ -41,10 +41,13 @@ void stat_cache_new(worker *wrk, gdouble ttl) {
void stat_cache_free(stat_cache *sc) {
GHashTableIter iter;
gpointer k, v;
stat_cache_entry *dummy;
/* wake up thread */
g_async_queue_push(sc->job_queue_out, g_slice_new0(stat_cache_entry));
dummy = g_slice_new0(stat_cache_entry);
g_async_queue_push(sc->job_queue_out, dummy);
g_thread_join(sc->thread);
g_slice_free(stat_cache_entry, dummy);
ev_async_stop(sc->delete_queue.loop, &sc->job_watcher);