diff --git a/cfg/posix.cfg b/cfg/posix.cfg
index ddea2000e..c140421bc 100644
--- a/cfg/posix.cfg
+++ b/cfg/posix.cfg
@@ -1187,17 +1187,6 @@ The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() func
-
-
- false
-
-
-
-
-
-
-
-
false
@@ -5724,11 +5713,10 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
free
- strdup
strndup
wcsdup
free
-
+
mmap
mmap64
diff --git a/cfg/std.cfg b/cfg/std.cfg
index e63a9a413..11b20948e 100644
--- a/cfg/std.cfg
+++ b/cfg/std.cfg
@@ -7976,6 +7976,17 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
+
+
+ false
+
+
+
+
+
+
+
+
false
@@ -8185,6 +8196,10 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
reallocarray
free
+
+ strdup
+ free
+
fopen
tmpfile
diff --git a/test/cfg/std.c b/test/cfg/std.c
index 8310686ea..f3e600b03 100644
--- a/test/cfg/std.c
+++ b/test/cfg/std.c
@@ -2891,6 +2891,14 @@ void uninitvar_vprintf(char *Format, va_list Arg)
(void)vprintf(Format,arg2);
}
+void memleak_strdup (char *s) // #9328
+{
+ char *s1 = strdup(s);
+ printf("%s",s1);
+ free(s); // s1 is not freed
+ // cppcheck-suppress memleak
+}
+
void uninitvar_vwprintf(wchar_t *Format, va_list Arg)
{
wchar_t * format1, * format2;