From cede22b7d2a4006a212670776d0395c750f711de Mon Sep 17 00:00:00 2001 From: hackbard Date: Thu, 23 Oct 2003 15:53:30 +0000 Subject: [PATCH] free allocated memory after writing data to file --- newton.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.39.2