projects
/
physik
/
computational_physics.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bb6da85
)
free allocated memory after writing data to file
author
hackbard
<hackbard>
Thu, 23 Oct 2003 15:53:30 +0000
(15:53 +0000)
committer
hackbard
<hackbard>
Thu, 23 Oct 2003 15:53:30 +0000
(15:53 +0000)
newton.c
patch
|
blob
|
history
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
*
*
* 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);
gp_add_data(fd,buf,3,steps,TYPE_DOUBLE);
gp_close(fd);
+ free(buf);
+
return 1;
}
return 1;
}