diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-21 11:22:42 -0500 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2014-02-21 19:50:38 +0100 |
commit | a0eb2a751c6f3e9c233772cd9af8e8ee1504d27a (patch) | |
tree | 6e0a6ca3f9049b1dea7be0aba25f09fbf611171d | |
parent | a2fef7701ba2e0179ec2217fd562b7345b15735c (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.
-rw-r--r-- | src/login/logind-session.c | 2 |
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 }; |