From df69f4e4bef39d4a7eedf9c65d05cc7ff1fa14df Mon Sep 17 00:00:00 2001 From: Pavel Roschin Date: Tue, 11 Feb 2014 16:49:17 +0400 Subject: [PATCH] Library: add mk[sd]temp to Posix --- cfg/posix.cfg | 4 ++++ test/testmemleak.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/cfg/posix.cfg b/cfg/posix.cfg index 2e682a2d3..b781adbc7 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -4,6 +4,10 @@ true false + false + false + false + close socket diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index 1a2ea80e4..12248294f 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -4248,6 +4248,14 @@ private: ASSERT_EQUALS("[test.cpp:5]: (error) Resource leak: leak1\n" "[test.cpp:5]: (error) Resource leak: leak2\n" "[test.cpp:5]: (error) Resource leak: leak3\n", errout.str()); + + check("void f(char *a) {\n" + " char *s = g_strdup(a);\n" + " mkstemp(s);\n" + " mkdtemp(s);\n" + " mktemp(s);\n" + "}"); + ASSERT_EQUALS("[test.cpp:6]: (error) Memory leak: s\n", errout.str()); } };