libresman

diff src/threadpool.c @ 9:03f3de659c32

threadpool: forgot to free the job after running the work callback
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 04 Feb 2014 05:42:31 +0200
parents 410c19c735b2
children 4d18498a0078
line diff
     1.1 --- a/src/threadpool.c	Mon Feb 03 05:24:22 2014 +0200
     1.2 +++ b/src/threadpool.c	Tue Feb 04 05:42:31 2014 +0200
     1.3 @@ -117,6 +117,8 @@
     1.4  		tpool->work_list = tpool->work_list->next;
     1.5  
     1.6  		tpool->work_func(job->data, tpool->cls);
     1.7 +
     1.8 +		free_node(job);
     1.9  	}
    1.10  	pthread_mutex_unlock(&tpool->work_lock);
    1.11  	return 0;