[Bug 860382] Re: plymouth leaks an fd

Steve Langasek steve.langasek at canonical.com
Fri Sep 30 03:53:51 UTC 2011


** Changed in: plymouth (Ubuntu)
       Status: New => Triaged

** Changed in: plymouth (Ubuntu)
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to plymouth in Ubuntu.
https://bugs.launchpad.net/bugs/860382

Title:
  plymouth leaks an fd

Status in “plymouth” package in Ubuntu:
  Triaged

Bug description:
  src/client/plymouth.c:get_kernel_command_line() leaks an fd at line
  731:

  719   fd = open ("proc/cmdline", O_RDONLY);
  720   
  721   if (fd < 0)
  722     {
  723       ply_trace ("couldn't open it: %m");
  724       return false;      
  725     }
  726   
  727   ply_trace ("reading kernel command line");
  728   if (read (fd, state->kernel_command_line, sizeof (state->kernel_command_line)) < 0)
  729     {
  730       ply_trace ("couldn't read it: %m");
  731       return false;      
  732     }

  The if test at 728 should do the following:

  729     {
  730       ply_trace ("couldn't read it: %m");
  731       close (fd);
  732       return false;      
  733     }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/860382/+subscriptions




More information about the foundations-bugs mailing list