Tests: Fix use-after-free in fst testcases (#2709)
This commit is contained in:
parent
3039735648
commit
f98782c061
|
|
@ -1816,10 +1816,11 @@ free(xc->curval_mem);
|
||||||
free(xc->valpos_mem);
|
free(xc->valpos_mem);
|
||||||
free(xc->vchg_mem);
|
free(xc->vchg_mem);
|
||||||
tmpfile_close(&xc->tchn_handle, &xc->tchn_handle_nam);
|
tmpfile_close(&xc->tchn_handle, &xc->tchn_handle_nam);
|
||||||
|
fstWriterContext* const parent = xc->xc_parent;
|
||||||
free(xc);
|
free(xc);
|
||||||
|
|
||||||
xc->xc_parent->in_pthread = 0;
|
parent->in_pthread = 0;
|
||||||
pthread_mutex_unlock(&(xc->xc_parent->mutex));
|
pthread_mutex_unlock(&(parent->mutex));
|
||||||
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue