mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
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->vchg_mem);
|
||||
tmpfile_close(&xc->tchn_handle, &xc->tchn_handle_nam);
|
||||
fstWriterContext* const parent = xc->xc_parent;
|
||||
free(xc);
|
||||
|
||||
xc->xc_parent->in_pthread = 0;
|
||||
pthread_mutex_unlock(&(xc->xc_parent->mutex));
|
||||
parent->in_pthread = 0;
|
||||
pthread_mutex_unlock(&(parent->mutex));
|
||||
|
||||
return(NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user