about summary refs log tree commit diff homepage
path: root/tools/ktest-randgen/ktest-randgen.cpp
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@comsys.rwth-aachen.de>2023-06-11 15:07:13 +0200
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2023-06-11 19:19:14 +0100
commitf3a4b343b09a431f708e74870ce1a1021c94c93a (patch)
treeb26c584e060d924cab7ab0672535ca7e276e5404 /tools/ktest-randgen/ktest-randgen.cpp
parentb926b3d49d7650ba76c81f4dfe0fd9aad44150d2 (diff)
downloadklee-f3a4b343b09a431f708e74870ce1a1021c94c93a.tar.gz
fix ktest-randgen: use after free
Diffstat (limited to 'tools/ktest-randgen/ktest-randgen.cpp')
-rw-r--r--tools/ktest-randgen/ktest-randgen.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/ktest-randgen/ktest-randgen.cpp b/tools/ktest-randgen/ktest-randgen.cpp
index 4bf3e23c..19a4a0d6 100644
--- a/tools/ktest-randgen/ktest-randgen.cpp
+++ b/tools/ktest-randgen/ktest-randgen.cpp
@@ -114,7 +114,6 @@ void create_stat(size_t size, struct stat *s) {
 
   if (write(fd, memset(buf, 0, size), size) != (int)size) {
     free(buf);
-    free(filename);
     error_exit("%s:%d: Error writing %s\n", __FILE__, __LINE__, filename);
   }
 #if defined(__has_feature)