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.
This commit is contained in:
committed by
Kay Sievers
parent
a2fef7701b
commit
a0eb2a751c
@@ -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 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user