summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-03-23 16:52:00 +0100
committerLeah Neukirchen <leah@vuxu.org>2017-03-23 16:52:00 +0100
commit011dced256d2bcd98c633ce2f5d816fd24f0e7a3 (patch)
treec61b2b1ccd69d5e09ca79ae7df4ff7c342f3d34e
parenta14647aa20f003ef70c7ad2de915605ccacfd00b (diff)
downloadredo-c-011dced256d2bcd98c633ce2f5d816fd24f0e7a3.tar.gz
redo-c-011dced256d2bcd98c633ce2f5d816fd24f0e7a3.tar.xz
redo-c-011dced256d2bcd98c633ce2f5d816fd24f0e7a3.zip
run_script: do not leak lock file fds
-rw-r--r--redo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/redo.c b/redo.c
index d5ae55c..5c5ff93 100644
--- a/redo.c
+++ b/redo.c
@@ -556,6 +556,7 @@ new_waitjob(int fd, int implicit)
 		job->pid = pid;
 		job->implicit = implicit;
 
+		close(fd);
 		insert_job(job);
 	}
 
@@ -615,6 +616,7 @@ run_script(char *target, int implicit)
 			exit(111);
 		}
 	}
+	close(fd);
 
 	dep_fd = mkstemp(temp_depfile);