file_system/ext2 Fix checking wrong allocation
* Test the correct allocation before returning no memory Change-Id: Id4422dab2e99487e015e1d915bfba5c18d1b8030 Reviewed-on: https://review.haiku-os.org/c/1044 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
@@ -530,7 +530,7 @@ Journal::_WriteTransactionToLog()
|
|||||||
"the commit block, block size %" B_PRIu32 "\n", fBlockSize);
|
"the commit block, block size %" B_PRIu32 "\n", fBlockSize);
|
||||||
JournalHeader* commitBlock =
|
JournalHeader* commitBlock =
|
||||||
(JournalHeader*)new(std::nothrow) uint8[fBlockSize];
|
(JournalHeader*)new(std::nothrow) uint8[fBlockSize];
|
||||||
if (descriptorBlock == NULL) {
|
if (commitBlock == NULL) {
|
||||||
TRACE("Journal::_WriteTransactionToLog(): Failed to allocate a buffer "
|
TRACE("Journal::_WriteTransactionToLog(): Failed to allocate a buffer "
|
||||||
"for the commit block\n");
|
"for the commit block\n");
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|||||||
Reference in New Issue
Block a user