Skip to content

Commit 9b3f4ce

Browse files
committed
Fix fd leak in error case, found by cppcheck.
1 parent a8efa4f commit 9b3f4ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

child.c

+1
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ setup_read_file(int fd, char *filename, long filesize)
249249
if (lseek(out, offset, SEEK_SET) != offset) {
250250
warn("error seeking to beginning -- giving up");
251251
tell_client(fd, 151, NULL);
252+
close(out);
252253
return NULL;
253254
}
254255
}

0 commit comments

Comments
 (0)