diff --git a/src/system/kernel/cache/block_cache.cpp b/src/system/kernel/cache/block_cache.cpp index ec4691c73c..6aae2ed7a4 100644 --- a/src/system/kernel/cache/block_cache.cpp +++ b/src/system/kernel/cache/block_cache.cpp @@ -2373,7 +2373,7 @@ cache_detach_sub_transaction(void* _cache, int32 id, // create a new transaction for the sub transaction cache_transaction* newTransaction = new(std::nothrow) cache_transaction; - if (transaction == NULL) + if (newTransaction == NULL) return B_NO_MEMORY; newTransaction->id = atomic_add(&cache->next_transaction_id, 1);