From 1946bbc0de8be51618998a587d14a7069a3079b5 Mon Sep 17 00:00:00 2001 From: James Hunt Date: Tue, 11 Oct 2011 22:11:10 -0400 Subject: [PATCH] main: plug fd leak This plugs an fd leak in an error path --- src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.c b/src/main.c index dbd4d822..140df67c 100644 --- a/src/main.c +++ b/src/main.c @@ -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; }