0023265: cppcheck warning: Mismatching allocation and deallocation
[occt.git] / src / QADNaming / QADNaming_IteratorsCommands.cxx
index 4416333..aa4bcd7 100755 (executable)
@@ -158,7 +158,7 @@ static Standard_Integer GetAllNewShapes (Draw_Interpretor& di,
            sprintf(aSubName,"%s_%d",aName,a);
          } else aSubName = NULL;
          aResult+=GetAllNew(anIter.NewShape(),aLabel,aSubName,0);
-         if (aSubName != NULL) delete(aSubName);
+         if (aSubName != NULL) delete [] aSubName;
        }
       }
     } else { // shape