Skip to content
Commit 8ae909a5 authored by Szabolcs Nagy's avatar Szabolcs Nagy
Browse files

malloc: Fix a potential realloc issue with memory tagging



At an _int_free call site in realloc the wrong size was used for tag
clearing: the chunk header of the next chunk was also cleared which
in practice may work, but logically wrong.

The tag clearing is moved before the memcpy to save a tag computation,
this avoids a chunk2mem.  Another chunk2mem is removed because newmem
does not have to be recomputed. Whitespaces got fixed too.

Reviewed-by: default avatarDJ Delorie <dj@redhat.com>
parent 42cc9606
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment