From: hackbard Date: Thu, 23 Oct 2003 15:53:30 +0000 (+0000) Subject: free allocated memory after writing data to file X-Git-Url: https://www.hackdaworld.org/gitweb/?a=commitdiff_plain;ds=inline;h=cede22b7d2a4006a212670776d0395c750f711de;p=physik%2Fcomputational_physics.git free allocated memory after writing data to file --- diff --git a/newton.c b/newton.c index dbb2d34..ee74b6e 100644 --- a/newton.c +++ b/newton.c @@ -2,7 +2,7 @@ * newton'sche bewegungsgleichung * * - * usage: ./newton + * usage: ./newton * */ @@ -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; }