Fix a use-after-free.
Some checks failed
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
Some checks failed
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
This commit is contained in:
@ -157,7 +157,6 @@ void FltkFont::initSystemFonts ()
|
|||||||
_MSG("Found font: %s%s%s\n", name, t & FL_BOLD ? " bold" : "",
|
_MSG("Found font: %s%s%s\n", name, t & FL_BOLD ? " bold" : "",
|
||||||
t & FL_ITALIC ? " italic" : "");
|
t & FL_ITALIC ? " italic" : "");
|
||||||
|
|
||||||
free (name);
|
|
||||||
|
|
||||||
auto &family = (*systemFonts)[ name ];
|
auto &family = (*systemFonts)[ name ];
|
||||||
if( family ) {
|
if( family ) {
|
||||||
@ -168,6 +167,8 @@ void FltkFont::initSystemFonts ()
|
|||||||
family = std::make_unique< FontFamily >( (Fl_Font) i, -1, -1, -1 );
|
family = std::make_unique< FontFamily >( (Fl_Font) i, -1, -1, -1 );
|
||||||
family->set( (Fl_Font) i, t );
|
family->set( (Fl_Font) i, t );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free (name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user