mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 15:48:05 +02:00
tablet-shell: Avoid leaking icon or path strings from invalid launcher section
This commit is contained in:
parent
b5c973c8c2
commit
d58e395bf2
1 changed files with 3 additions and 4 deletions
|
|
@ -454,12 +454,11 @@ int main(int argc, char *argv[])
|
|||
weston_config_section_get_string(s, "icon", &icon, NULL);
|
||||
weston_config_section_get_string(s, "path", &path, NULL);
|
||||
|
||||
if (icon == NULL || path == NULL) {
|
||||
if (icon != NULL && path != NULL)
|
||||
tablet_shell_add_launcher(&tablet, icon, path);
|
||||
else
|
||||
fprintf(stderr, "invalid launcher section\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
tablet_shell_add_launcher(&tablet, icon, path);
|
||||
free(icon);
|
||||
free(path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue