aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--executor/common_linux.h6
-rw-r--r--pkg/csource/generated.go6
2 files changed, 0 insertions, 12 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 4c33acdea..ff3126641 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -2701,9 +2701,7 @@ static void check_leaks(void)
ssize_t n = read(fd, buf, sizeof(buf) - 1);
if (n < 0)
fail("failed to read(%s)", KMEMLEAK_FILE);
-#if SYZ_EXECUTOR
int nleaks = 0;
-#endif
if (n != 0) {
sleep(1);
if (write(fd, "scan", 4) != 4)
@@ -2738,18 +2736,14 @@ static void check_leaks(void)
fprintf(stderr, "BUG: memory leak\n%s\n", pos);
*next = prev;
pos = next;
-#if SYZ_EXECUTOR
nleaks++;
-#endif
}
}
if (write(fd, "clear", 5) != 5)
fail("failed to write(%s, \"clear\")", KMEMLEAK_FILE);
close(fd);
-#if SYZ_EXECUTOR
if (nleaks)
doexit(1);
-#endif
}
#endif
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 53458f2f6..6f2a36354 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -4884,9 +4884,7 @@ static void check_leaks(void)
ssize_t n = read(fd, buf, sizeof(buf) - 1);
if (n < 0)
fail("failed to read(%s)", KMEMLEAK_FILE);
-#if SYZ_EXECUTOR
int nleaks = 0;
-#endif
if (n != 0) {
sleep(1);
if (write(fd, "scan", 4) != 4)
@@ -4920,18 +4918,14 @@ static void check_leaks(void)
fprintf(stderr, "BUG: memory leak\n%s\n", pos);
*next = prev;
pos = next;
-#if SYZ_EXECUTOR
nleaks++;
-#endif
}
}
if (write(fd, "clear", 5) != 5)
fail("failed to write(%s, \"clear\")", KMEMLEAK_FILE);
close(fd);
-#if SYZ_EXECUTOR
if (nleaks)
doexit(1);
-#endif
}
#endif