summaryrefslogtreecommitdiff
path: root/schulung_tools/mtrace/leak.c
diff options
context:
space:
mode:
Diffstat (limited to 'schulung_tools/mtrace/leak.c')
-rw-r--r--schulung_tools/mtrace/leak.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/schulung_tools/mtrace/leak.c b/schulung_tools/mtrace/leak.c
new file mode 100644
index 0000000..45ec7b1
--- /dev/null
+++ b/schulung_tools/mtrace/leak.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <mcheck.h>
+
+void a(void)
+{
+ malloc(1024);
+}
+
+int main(void)
+{
+ mtrace();
+ a();
+ return 0;
+}