From 4c901476bf51a9dd6a46a7d1f9cb7a31ef1d8a0a Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 15 May 2014 22:43:18 +0200 Subject: [PATCH] CID 1210843: useless delete. --- src/apps/debugger/dwarf/DwarfFile.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index fc7661e88a..ad2fd47876 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -1041,10 +1041,8 @@ DwarfFile::_ParseTypesSection() unitHeaderOffset, unitContentOffset, unitLength + (unitLengthOffset - unitHeaderOffset), abbrevOffset, typeOffset, addressSize, signature, dwarf64); - if (unit == NULL) { - delete unit; + if (unit == NULL) return B_NO_MEMORY; - } // parse the debug info for the unit status_t error = _ParseTypeUnit(unit);