]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
client: fix fd leak
authorJames Hunt <james.hunt@ubuntu.com>
Wed, 12 Oct 2011 02:01:07 +0000 (22:01 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 12 Oct 2011 02:01:07 +0000 (22:01 -0400)
This plugs an fd leak in an error path

src/client/plymouth.c

index 84fe6e30c6c55a79e6eba64eee3130426a2c12a7..72574180cd135c284245e76e818ec01c2fc39e15 100644 (file)
@@ -773,6 +773,7 @@ get_kernel_command_line (state_t *state)
   if (read (fd, state->kernel_command_line, sizeof (state->kernel_command_line)) < 0)
     {
       ply_trace ("couldn't read it: %m");
+      close (fd);
       return false;
     }