1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-04-14 17:43:01 -04:00

Fix memory leak when both -drun-categories and -drun-exclude-categories are used

This commit is contained in:
Johannes4433 2025-02-20 21:07:11 +01:00
parent c8c723000f
commit 20bdc66ad2

View file

@ -724,8 +724,10 @@ static void read_desktop_file(DRunModePrivateData *pd, const char *root,
}
if (pd->exclude_categories) {
categories = g_key_file_get_locale_string_list(
kf, DRUN_GROUP_NAME, "Categories", NULL, NULL, NULL);
if (categories == NULL) {
categories = g_key_file_get_locale_string_list(
kf, DRUN_GROUP_NAME, "Categories", NULL, NULL, NULL);
}
if (rofi_strv_contains((const char *const *)categories,
(const char *const *)pd->exclude_categories)) {
g_strfreev(categories);