[systemd-commits] src/login
Kay Sievers
kay at kemper.freedesktop.org
Fri Feb 21 10:50:50 PST 2014
src/login/logind-session.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a0eb2a751c6f3e9c233772cd9af8e8ee1504d27a
Author: Jasper St. Pierre <jstpierre at mecheye.net>
Date: Fri Feb 21 11:22:42 2014 -0500
logind-session: Fix invalid free in the error case
utf8 needs to be initialized to NULL for the free for the early return,
otherwise we try to free invalid data.
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 81d12cb..548f049 100644
--- 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 };
More information about the systemd-commits
mailing list