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

src/main.c

index dbd4d8228d20013257aac093e45a74e465d2e780..140df67cc9682c4c252bb3e9c03f5bac0d438359 100644 (file)
@@ -1689,6 +1689,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;
     }