Fix use after free memory error with adress
authorRoland Schulz <roland@utk.edu>
Wed, 1 Aug 2012 00:38:43 +0000 (20:38 -0400)
committerRoland Schulz <roland@utk.edu>
Wed, 1 Aug 2012 00:38:43 +0000 (20:38 -0400)
Change-Id: I481a55704a0a93235df531269bbbe40240dd12dc

src/kernel/readadress.c

index b8af74cb5677186189e139aaaab8c8b55e73184b..8564dbec1d58c7a1b895f444d64c6fe3d4ddfb66 100644 (file)
@@ -73,6 +73,9 @@ void read_adressparams(int *ninp_p,t_inpfile **inp_p,t_adress *adress, warninp_t
     adress->refs[i]=strtod(ptr1[i],NULL);
   for( ;(i<DIM); i++) /*remaining undefined components of the vector set to zero*/
     adress->refs[i]=0;
+
+  *ninp_p   = ninp;
+  *inp_p    = inp;
 }
 
 void do_adress_index(t_adress *adress, gmx_groups_t *groups,char **gnames,t_grpopts *opts,warninp_t wi){