diff options
| author | Michael Brown | 2010-11-05 23:37:00 +0100 |
|---|---|---|
| committer | Michael Brown | 2010-11-08 04:35:35 +0100 |
| commit | 13e4b9ec498e4374cf7208b18723e87796aa1735 (patch) | |
| tree | dfd970a19e0b6913da4201769b6c3f5e70db1566 /src/net | |
| parent | [refcnt] Check reference validity on each use of ref_get() and ref_put() (diff) | |
| download | ipxe-13e4b9ec498e4374cf7208b18723e87796aa1735.tar.gz ipxe-13e4b9ec498e4374cf7208b18723e87796aa1735.tar.xz ipxe-13e4b9ec498e4374cf7208b18723e87796aa1735.zip | |
[malloc] Avoid immediately clobbering reference count when freeing memory
Rearrange the fields in struct memory_block (without altering
MIN_MEMBLOCK_SIZE) so that the "count" field of a reference-counted
object is left intact when the memory containing the object is freed.
This allows for the possibility of detecting reference-counting errors
such as double-freeing.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net')
0 files changed, 0 insertions, 0 deletions
