Re:Sorry state of dynamic libraries on Linux
by shin_lao on Monday September 17, 2012 @11:10AM
(#4532895)
strdup(), part of the libc, allocates memory with a function from the libc (malloc), therefore you are allocating and freeing memory with functions within the same library.
However, yes, for security reasons strdup should be avoided.
Ah, I guess I'll have to stop using strdup() then.