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:
7e21daa
)
Coverity: Close directory handle along error paths.
author
Richard W.M. Jones
<rjones@redhat.com>
Wed, 8 Jun 2011 21:27:01 +0000
(22:27 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Mon, 13 Jun 2011 13:22:15 +0000
(14:22 +0100)
(cherry picked from commit
7c020a14802255c966b2b402b983551b86a08bba
)
daemon/devsparts.c
patch
|
blob
|
history
diff --git
a/daemon/devsparts.c
b/daemon/devsparts.c
index
c8f0256
..
52a6d30
100644
(file)
--- a/
daemon/devsparts.c
+++ b/
daemon/devsparts.c
@@
-89,6
+89,7
@@
foreach_block_device (block_dev_func_t func)
if(0 != errno) {
reply_with_perror ("readdir: /sys/block");
free_stringslen(r, size);
+ closedir (dir);
return NULL;
}
@@
-175,6
+176,7
@@
add_partitions(const char *device,
if(0 != errno) {
reply_with_perror ("readdir: %s", devdir);
free_stringslen(*r, *size);
+ closedir (dir);
return -1;
}