mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-04 15:13:58 +01:00
dt_unring_buf: set dtbd_oldest to the start of the first record
It was set to the start of the buffer and that can be different from the
start of teh first record because of a misalignment.
This change follows the example of dt_realloc_buf().
(cherry picked from commit 256c8c5df2
)
This commit is contained in:
parent
b76c310366
commit
36dbd16688
@ -2621,7 +2621,7 @@ dt_unring_buf(dtrace_hdl_t *dtp, dtrace_bufdesc_t *buf)
|
||||
bcopy(buf->dtbd_data, ndp, buf->dtbd_oldest);
|
||||
|
||||
dt_free(dtp, buf->dtbd_data);
|
||||
buf->dtbd_oldest = 0;
|
||||
buf->dtbd_oldest = misalign;
|
||||
buf->dtbd_data = newdata;
|
||||
buf->dtbd_size += misalign;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user