pthreadpool_add_job first adds the job to its internal array.
If for some reason a following call fails(e.g. pthread_create),
the caller will free the data structure while it is still referenced
in the pthreadpool array and a workerthread can access the freed
Patch to follow.
Created attachment 13852 [details]
Patches for 4.7
Created attachment 13853 [details]
Patches for 4.6
Created attachment 13855 [details]
Additional fix for cmocka test (4.7. only)
Pushed patches + additional patch to autobuild-v4-7-test and patches to autobuild-v4-6-test.
Pushed to both branches.
Closing out bug report.