plymouth leaks an fd

Bug #860382 reported by James Hunt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
plymouth (Ubuntu)
Triaged
Low
Unassigned

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 }

Steve Langasek (vorlon)
Changed in plymouth (Ubuntu):
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.