added some (unlikely required) free()s
This commit is contained in:
parent
e472a4bf75
commit
b58a5431d3
3
thpool.c
3
thpool.c
|
@ -143,6 +143,9 @@ struct thpool_* thpool_init(int num_threads){
|
|||
thpool_p->threads = (struct thread**)malloc(num_threads * sizeof(struct thread));
|
||||
if (thpool_p->threads == NULL){
|
||||
fprintf(stderr, "thpool_init(): Could not allocate memory for threads\n");
|
||||
jobqueue_destroy(thpool_p);
|
||||
free(thpool_p->jobqueue_p);
|
||||
free(thpool_p);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue