]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: use unlink_and_free() at once more place
authorLennart Poettering <lennart@poettering.net>
Wed, 29 Nov 2023 10:21:21 +0000 (11:21 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 4 Jan 2024 21:56:20 +0000 (22:56 +0100)
src/login/logind-session.c

index 979e506897e8adfce2eeee418334ddc0821355ea..6b3f786fe918695e65e794244e070485b0091e05 100644 (file)
@@ -1288,11 +1288,7 @@ static void session_remove_fifo(Session *s) {
 
         s->fifo_event_source = sd_event_source_unref(s->fifo_event_source);
         s->fifo_fd = safe_close(s->fifo_fd);
-
-        if (s->fifo_path) {
-                (void) unlink(s->fifo_path);
-                s->fifo_path = mfree(s->fifo_path);
-        }
+        s->fifo_path = unlink_and_free(s->fifo_path);
 }
 
 bool session_may_gc(Session *s, bool drop_not_started) {