]> git.donarmstrong.com Git - mothur.git/blobdiff - readdistcommand.cpp
fixed memory leak of groupmap in reads
[mothur.git] / readdistcommand.cpp
index a9d772183d253168e96d48aa6d979c94616bde0d..6d38f4e4d55cde380570dd53aaa847f96600550f 100644 (file)
@@ -21,6 +21,7 @@ ReadDistCommand::ReadDistCommand(){
                else if (format == "matrix") { 
                                groupMap = new GroupMap(globaldata->getGroupFile());
                                groupMap->readMap();
+                               if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap;  }
                                globaldata->gGroupmap = groupMap;
                }