From 0b8e46c7e3a79d4b21019907b1c55912f7b18cb1 Mon Sep 17 00:00:00 2001
From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa>
Date: Mon, 8 Jul 2013 19:36:22 +0000
Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10229
 f3b2605a-c512-4ea7-a41b-209d697bcdaa

---
 src/read_data.cpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/read_data.cpp b/src/read_data.cpp
index 56a7651e0a..dc687f7f06 100644
--- a/src/read_data.cpp
+++ b/src/read_data.cpp
@@ -81,6 +81,14 @@ ReadData::~ReadData()
   delete [] keyword;
   delete [] buffer;
   memory->sfree(arg);
+
+  for (int i = 0; i < nfix; i++) {
+    delete [] fix_header[i];
+    delete [] fix_section[i];
+  }
+  memory->destroy(fix_index);
+  memory->sfree(fix_header);
+  memory->sfree(fix_section);
 }
 
 /* ---------------------------------------------------------------------- */
@@ -447,12 +455,13 @@ void ReadData::header(int flag)
 
     // search line for header keyword and set corresponding variable
 
-    if (strstr(line,"atoms")) sscanf(line,BIGINT_FORMAT,&atom->natoms);
+    if (strstr(line,"atoms")) {
+      sscanf(line,BIGINT_FORMAT,&atom->natoms);
 
     // check for these first
     // otherwise "triangles" will be matched as "angles"
 
-    else if (strstr(line,"ellipsoids")) {
+    } else if (strstr(line,"ellipsoids")) {
       if (!avec_ellipsoid && me == 0)
         error->one(FLERR,"No ellipsoids allowed with this atom style");
       sscanf(line,BIGINT_FORMAT,&nellipsoids);
-- 
GitLab