[systemd-commits] src/login

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Sun Aug 31 14:41:15 PDT 2014


 src/login/logind-session.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 13f493dc9ace9861c1f27c4d37e8cd6d52fe6a32
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Sun Aug 31 23:34:01 2014 +0200

    login: fix mem leak

diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 0c6e425..58453b5 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -1114,8 +1114,10 @@ int session_set_controller(Session *s, const char *sender, bool force) {
          * If logind crashes/restarts, we restore the controller during restart
          * or reset the VT in case it crashed/exited, too. */
         r = session_prepare_vt(s);
-        if (r < 0)
+        if (r < 0) {
+                free(t);
                 return r;
+        }
 
         session_swap_controller(s, t);
 



More information about the systemd-commits mailing list