Please sign in to comment.
Fix 0 byte memory leak in zfs receive
Currently, when a DRR_OBJECT record is read into memory in receive_read_record(), memory is allocated for the bonus buffer. However, if the object doesnt have a bonus buffer the code will still "allocate" the zero bytes, but the memory will not be passed to the processing thread for cleanup later. This causes the spl kmem trackking code to report a leak. This patch simply changes the code so that it only allocates this memory if it has a non-zero length. Signed-off-by: Tom Caputi <email@example.com>
- Loading branch information...