aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-02-23 23:41:13 +1300
committerDavid Phillips <david@sighup.nz>2017-02-23 23:41:13 +1300
commita9bf354fc6c53ce39c1af51902e15e86d42369bc (patch)
tree6489e7d7a640e45f344ebbb98fc13bddd9dee3bb
parent5b1c35bd427a12ea39443142bf4540242a022963 (diff)
downloadfractal-gen-opencl-a9bf354fc6c53ce39c1af51902e15e86d42369bc.tar.xz
Add missing free()s
-rw-r--r--fractal-gen.c2
-rw-r--r--trampoline.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/fractal-gen.c b/fractal-gen.c
index 4740e45..8efa947 100644
--- a/fractal-gen.c
+++ b/fractal-gen.c
@@ -59,6 +59,8 @@ int run(const char *preferred_platform, unsigned int size, unsigned long iterati
printf("P5\n%d\n%d\n255\n",size,size);
fwrite(buffer, size*size, 1, stdout);
+
+ free(buffer);
}
void die_help()
diff --git a/trampoline.c b/trampoline.c
index fd0af52..3759adf 100644
--- a/trampoline.c
+++ b/trampoline.c
@@ -113,7 +113,7 @@ int select_platform(const char *preferred_platform)
platform = platforms[0];
}
-
+ free(platforms);
return 0;
}