mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibGfx: Destroy FontConfig string iterator after use
This avoids a memory leak in `FontDatabase::font_directories()`.
This commit is contained in:
parent
d49106c007
commit
e69d9fb331
|
|
@ -63,6 +63,7 @@ ErrorOr<Vector<String>> FontDatabase::font_directories()
|
||||||
char const* dir_cstring = reinterpret_cast<char const*>(dir);
|
char const* dir_cstring = reinterpret_cast<char const*>(dir);
|
||||||
paths.append(TRY(String::from_utf8(StringView { dir_cstring, strlen(dir_cstring) })));
|
paths.append(TRY(String::from_utf8(StringView { dir_cstring, strlen(dir_cstring) })));
|
||||||
}
|
}
|
||||||
|
FcStrListDone(dirs);
|
||||||
return paths;
|
return paths;
|
||||||
|
|
||||||
#elif defined(AK_OS_HAIKU)
|
#elif defined(AK_OS_HAIKU)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user