projects
/
physik
/
computational_physics.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
free allocated memory after writing data to file
[physik/computational_physics.git]
/
newton.c
diff --git
a/newton.c
b/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;
}