chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2fef77
)
logind-session: Fix invalid free in the error case
author
Jasper St. Pierre
<jstpierre@mecheye.net>
Fri, 21 Feb 2014 16:22:42 +0000
(11:22 -0500)
committer
Kay Sievers
<kay@vrfy.org>
Fri, 21 Feb 2014 18:50:38 +0000
(19:50 +0100)
utf8 needs to be initialized to NULL for the free for the early return,
otherwise we try to free invalid data.
src/login/logind-session.c
patch
|
blob
|
history
diff --git
a/src/login/logind-session.c
b/src/login/logind-session.c
index 81d12cbcea89e06df8bb597576166fd375aaed26..548f049202e9c1baecb2b66ac1830f4e1c62a648 100644
(file)
--- a/
src/login/logind-session.c
+++ b/
src/login/logind-session.c
@@
-1008,7
+1008,7
@@
error:
}
void session_restore_vt(Session *s) {
- _cleanup_free_ char *utf8;
+ _cleanup_free_ char *utf8
= NULL
;
int vt, kb = K_XLATE;
struct vt_mode mode = { 0 };