]> hackdaworld.org Git - physik/computational_physics.git/commitdiff
free allocated memory after writing data to file
authorhackbard <hackbard>
Thu, 23 Oct 2003 15:53:30 +0000 (15:53 +0000)
committerhackbard <hackbard>
Thu, 23 Oct 2003 15:53:30 +0000 (15:53 +0000)
newton.c

index dbb2d347da4e19988a38e887b0db37defc6ba83e..ee74b6e384110d134cc387d9c82821d9f27f3dd1 100644 (file)
--- a/newton.c
+++ b/newton.c
@@ -2,7 +2,7 @@
  * newton'sche bewegungsgleichung
  *
  *
- * usage: ./newton <steps> <alpha> <x_p> <v_p>
+ * usage: ./newton <steps> <alpha> <x_0> <v_0>
  *
  */
 
@@ -57,5 +57,7 @@ int main(int argc,char **argv) {
  gp_add_data(fd,buf,3,steps,TYPE_DOUBLE);
  gp_close(fd);
 
+ free(buf);
+
  return 1;
 }