diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-06-08 22:27:01 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-06-09 10:53:46 +0100 |
commit | 7c020a14802255c966b2b402b983551b86a08bba (patch) | |
tree | 42a5e6bf35b4da51c145b32958551bc92581ebb2 /daemon | |
parent | 869c11b30c72c57e48dd63c4641087a06abe80d5 (diff) | |
download | libguestfs-7c020a14802255c966b2b402b983551b86a08bba.tar.gz libguestfs-7c020a14802255c966b2b402b983551b86a08bba.tar.xz libguestfs-7c020a14802255c966b2b402b983551b86a08bba.zip |
Coverity: Close directory handle along error paths.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/devsparts.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/daemon/devsparts.c b/daemon/devsparts.c index c8f0256a..52a6d304 100644 --- 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; } |