libresman

changeset 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 86465d3d05d2
children 4d18498a0078
files src/threadpool.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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;