chiark / gitweb /
login: minor typo fix
[elogind.git] / src / login / logind-session.c
index 5490366cc145e79bf75a9c648e8e073e18b8fffc..1f3a7f375514802e09e71e61c490631823540830 100644 (file)
@@ -28,6 +28,7 @@
 #include "strv.h"
 #include "util.h"
 #include "mkdir.h"
+#include "path-util.h"
 #include "cgroup-util.h"
 #include "logind-session.h"
 
@@ -49,7 +50,7 @@ Session* session_new(Manager *m, User *u, const char *id) {
                 return NULL;
         }
 
-        s->id = file_name_from_path(s->state_file);
+        s->id = path_get_file_name(s->state_file);
 
         if (hashmap_put(m->sessions, s->id, s) < 0) {
                 free(s->state_file);
@@ -327,6 +328,7 @@ finish:
         free(vtnr);
         free(leader);
         free(audit_id);
+        free(class);
 
         return r;
 }
@@ -380,7 +382,7 @@ static int session_link_x11_socket(Session *s) {
         c[k] = 0;
 
         if (access(f, F_OK) < 0) {
-                log_warning("Session %s has display %s with nonexisting socket %s.", s->id, s->display, f);
+                log_warning("Session %s has display %s with non-existing socket %s.", s->id, s->display, f);
                 free(f);
                 return -ENOENT;
         }