trim support code: The passed in MemoryDeleter was never used.

When a buffer has to be allocated, I guess the intention was to
assign the MemoryDeleter to it, so that it would later be freed.
CID 1130505
This commit is contained in:
Stephan Aßmus 2014-01-22 18:00:31 +01:00
parent 084a160655
commit 14652ec4bb

View File

@ -43,6 +43,10 @@ get_trim_data_from_user(void* buffer, size_t size, MemoryDeleter& deleter,
return B_BAD_ADDRESS;
}
// The passed in MemoryDeleter needs to take care of freeing the buffer
// later, since we had to allocate it.
deleter.SetTo(trimBuffer);
_trimData = (fs_trim_data*)trimBuffer;
return B_OK;
}