aboutsummaryrefslogtreecommitdiff
path: root/blaze822.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-02-10 22:03:45 +0100
committerLeah Neukirchen <leah@vuxu.org>2019-02-10 22:03:45 +0100
commit6ea32480f14542f71c6d192ae2d3a7898c9cd66b (patch)
tree34d368127108d71a623e834cf49f61ee57b377ab /blaze822.c
parent4198cd42fa5ed4be05663e8e1e8596839f29a8ee (diff)
downloadmblaze-6ea32480f14542f71c6d192ae2d3a7898c9cd66b.tar.gz
blaze822: blaze822_mmap: fix memleak
Found by clang 7.0.1.
Diffstat (limited to 'blaze822.c')
-rw-r--r--blaze822.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/blaze822.c b/blaze822.c
index 7175d8c..47710a3 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -669,6 +669,7 @@ blaze822_mmap(char *file)
char *buf = mmap(0, len+1, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
if (buf == MAP_FAILED) {
+ free(mesg);
perror("mmap");
goto error;
}