dtinfo/MixedGen.C: coverity CID 89495; use after free
authorJon Trulson <jon@radscan.com>
Sat, 31 Mar 2018 20:42:22 +0000 (14:42 -0600)
committerJon Trulson <jon@radscan.com>
Sat, 31 Mar 2018 20:42:22 +0000 (14:42 -0600)
cde/programs/dtinfo/dtinfogen/infolib/etc/MixedGen.C

index 2836206d47aff46988568c68ec7b553309c5b4dc..ca52767524315432d28ebb9fcada280816119f1b 100644 (file)
@@ -160,9 +160,6 @@ create_node_dict( hashTable<CC_String,BTCollectable> &dict,
     }
     else {
       
-      delete key;
-      delete value;
-
       throw_exception = 1;
       cerr << "(ERROR) Duplicate section ID = " << (const char *)*key << endl
           << "            found in file    = " << filename << endl
@@ -172,6 +169,8 @@ create_node_dict( hashTable<CC_String,BTCollectable> &dict,
           << "            found in file    = " << val->filename() << endl
           << "                  at line    = " << val->linenum() << "\n\n";
 
+      delete key;
+      delete value;
     }
   }