projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14c9892
)
weston-launch: Only pass non-NULL value into setenv()
author
Rob Bradford
<rob@linux.intel.com>
Fri, 9 Aug 2013 10:30:38 +0000
(11:30 +0100)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 13 Aug 2013 05:24:44 +0000
(22:24 -0700)
getenv() can return NULL is the key is not set, passing NULL into
setenv() is an error
src/weston-launch.c
patch
|
blob
|
history
diff --git
a/src/weston-launch.c
b/src/weston-launch.c
index
5b03094
..
7264f7e
100644
(file)
--- a/
src/weston-launch.c
+++ b/
src/weston-launch.c
@@
-515,7
+515,8
@@
setup_session(struct weston_launch *wl)
term = getenv("TERM");
clearenv();
- setenv("TERM", term, 1);
+ if (term)
+ setenv("TERM", term, 1);
setenv("USER", wl->pw->pw_name, 1);
setenv("LOGNAME", wl->pw->pw_name, 1);
setenv("HOME", wl->pw->pw_dir, 1);