mirror of
https://github.com/taglib/taglib.git
synced 2025-06-03 09:08:09 -04:00
Prevent string conversion buffer to stay in memory
This commit is contained in:
parent
804f882e38
commit
c9904354f9
@ -49,15 +49,15 @@ namespace
|
||||
|
||||
inline char *stringToCharArray(const String &s)
|
||||
{
|
||||
const char *c = s.toCString(unicodeStrings);
|
||||
const std::string str = s.to8Bit(unicodeStrings);
|
||||
|
||||
#ifdef HAVE_ISO_STRDUP
|
||||
|
||||
return ::_strdup(c);
|
||||
return ::_strdup(str.c_str());
|
||||
|
||||
#else
|
||||
|
||||
return ::strdup(c);
|
||||
return ::strdup(str.c_str());
|
||||
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user