From: Jasper St. Pierre Date: Fri, 21 Feb 2014 16:22:42 +0000 (-0500) Subject: logind-session: Fix invalid free in the error case X-Git-Tag: v210~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0eb2a751c6f3e9c233772cd9af8e8ee1504d27a;p=platform%2Fupstream%2Fsystemd.git 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 };