8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 14:43:03 +01:00

Postfix for #7169 - fix crashes caught by the tests.

This commit is contained in:
Adriano dos Santos Fernandes 2022-04-23 21:44:00 -03:00
parent 23f533e740
commit 4a890ea1b7
2 changed files with 6 additions and 3 deletions

View File

@ -38,8 +38,11 @@ namespace Firebird {
template <>
inline void SimpleDelete<charset>::clear(charset* cs)
{
Firebird::IntlUtil::finiCharset(cs);
delete cs;
if (cs)
{
Firebird::IntlUtil::finiCharset(cs);
delete cs;
}
}
}

View File

@ -52,7 +52,7 @@ static bool texttype_default_init(texttype* tt,
//const ASCII* configInfo)
{
AutoPtr<charset> cs(FB_NEW charset);
memset(&cs, 0, sizeof(cs));
memset(cs, 0, sizeof(*cs));
// test if that ICU charset exist
if (!CSICU_charset_init(cs, charSetName))