summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-02-21 11:22:42 -0500
committerKay Sievers <kay@vrfy.org>2014-02-21 19:50:38 +0100
commita0eb2a751c6f3e9c233772cd9af8e8ee1504d27a (patch)
tree6e0a6ca3f9049b1dea7be0aba25f09fbf611171d /src/login
parenta2fef7701ba2e0179ec2217fd562b7345b15735c (diff)
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.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-session.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 81d12cbcea..548f049202 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 };