projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05732c7
)
elput: Missing pointer initialization.
author
Benjamin Jacobs
<benj@spam.thsi.be>
Tue, 7 Jun 2016 13:42:49 +0000
(09:42 -0400)
committer
Chris Michael
<cpmichael@osg.samsung.com>
Tue, 7 Jun 2016 13:43:01 +0000
(09:43 -0400)
Summary:
Calling free() on an uninitialized pointer leads to crash, that can occurs
when sd_session_get_seat fails.
Fixes T3785.
Reviewers: devilhorns
Subscribers: cedric, jpeg
Maniphest Tasks: T3785
Differential Revision: https://phab.enlightenment.org/D4015
@fix
src/lib/elput/elput_logind.c
patch
|
blob
|
history
diff --git
a/src/lib/elput/elput_logind.c
b/src/lib/elput/elput_logind.c
index
22cb1b0
..
799a26a
100644
(file)
--- a/
src/lib/elput/elput_logind.c
+++ b/
src/lib/elput/elput_logind.c
@@
-427,7
+427,7
@@
_logind_connect(Elput_Manager **manager, const char *seat, unsigned int tty)
if (ret < 0)
{
ERR("Failed to get session seat");
- free(s);
+
if (s)
free(s);
goto seat_err;
}
else if ((seat) && (s) && (strcmp(seat, s)))