git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
746c4b7
)
daemon: Close leaked file descriptor along checksum error path (RHBZ#657499).
author
Richard W.M. Jones
<rjones@redhat.com>
Fri, 26 Nov 2010 10:18:29 +0000
(10:18 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 26 Nov 2010 10:18:29 +0000
(10:18 +0000)
daemon/checksum.c
patch
|
blob
|
history
diff --git
a/daemon/checksum.c
b/daemon/checksum.c
index
7967f0c
..
cdb0a18
100644
(file)
--- a/
daemon/checksum.c
+++ b/
daemon/checksum.c
@@
-61,8
+61,10
@@
checksum (const char *csumtype, int fd)
int len;
program = program_of_csum (csumtype);
- if (program == NULL)
+ if (program == NULL) {
+ close (fd);
return NULL;
+ }
flags = COMMAND_FLAG_CHROOT_COPY_FILE_TO_STDIN | fd;
r = commandf (&out, &err, flags, program, NULL);