]> git.donarmstrong.com Git - mothur.git/blobdiff - readotucommand.cpp
fixed memory leak of groupmap in reads
[mothur.git] / readotucommand.cpp
index eeb8cd6e3d910d30e7fde7b6d20947a693d739ed..2a0d33fe352b8e6f4621fd5d336b63ccfb5824b4 100644 (file)
@@ -43,6 +43,8 @@ int ReadOtuCommand::execute(){
                read->read(&*globaldata); 
                if (globaldata->getFormat() == "shared") {
                        groupMap->readMap();
+                       
+                       if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap;  }
                        globaldata->gGroupmap = groupMap;
                
                        shared = new SharedCommand();