Browse code

Fix memory leak of job

John Hawthorn authored on 15/01/2017 02:18:23
Showing 1 changed files

... ...
@@ -241,6 +241,7 @@ void choices_search(choices_t *c, const char *search) {
241 241
 
242 242
 	pthread_mutex_destroy(&job->lock);
243 243
 	free(workers);
244
+	free(job);
244 245
 
245 246
 	if(*search) {
246 247
 		qsort(c->results, c->available, sizeof(struct scored_result), cmpchoice);