free allocated memory after writing data to file
[physik/computational_physics.git] / newton.c
index dbb2d34..ee74b6e 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;
 }