git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Coverity: Ensure fp is closed along all error paths.
[libguestfs.git]
/
daemon
/
fallocate.c
diff --git
a/daemon/fallocate.c
b/daemon/fallocate.c
index
4947430
..
0c948ff
100644
(file)
--- a/
daemon/fallocate.c
+++ b/
daemon/fallocate.c
@@
-31,6
+31,17
@@
int
do_fallocate (const char *path, int len)
{
int
do_fallocate (const char *path, int len)
{
+ if (len < 0) {
+ reply_with_error ("length < 0");
+ return -1;
+ }
+
+ return do_fallocate64 (path, len);
+}
+
+int
+do_fallocate64 (const char *path, int64_t len)
+{
int fd;
CHROOT_IN;
int fd;
CHROOT_IN;