projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5c973c
)
tablet-shell: Avoid leaking icon or path strings from invalid launcher section
author
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 9 Oct 2013 20:05:55 +0000
(13:05 -0700)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Thu, 10 Oct 2013 23:50:18 +0000
(16:50 -0700)
clients/tablet-shell.c
patch
|
blob
|
history
diff --git
a/clients/tablet-shell.c
b/clients/tablet-shell.c
index
094823c
..
45733b1
100644
(file)
--- a/
clients/tablet-shell.c
+++ b/
clients/tablet-shell.c
@@
-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);
}