[Bug 860382] [NEW] plymouth leaks an fd
James Hunt
860382 at bugs.launchpad.net
Tue Sep 27 09:05:26 UTC 2011
Public bug reported:
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 }
** Affects: plymouth (Ubuntu)
Importance: Undecided
Status: New
--
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:
New
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