aboutsummaryrefslogtreecommitdiffstats
path: root/cmds-receive.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-01-14 09:40:24 +0100
committerDavid Sterba <dsterba@suse.com>2016-01-14 11:07:10 +0100
commit3f248d2431424e79445131514c5f558a14a2b9f2 (patch)
treeedc4db5c88f5133bb6caec693b5cac9f9a44d2e6 /cmds-receive.c
parent7faf96e30aacf927ac18c5a1e5c50921f0ae5eee (diff)
downloadbtrfs-progs-3f248d2431424e79445131514c5f558a14a2b9f2.tar.gz
btrfs-progs-3f248d2431424e79445131514c5f558a14a2b9f2.tar.xz
btrfs-progs-3f248d2431424e79445131514c5f558a14a2b9f2.zip
btrfs-progs: receive: don't leak open find handle
Resolves-coverity-id: 1348121 Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-receive.c')
-rw-r--r--cmds-receive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmds-receive.c b/cmds-receive.c
index 094a607..cbb1642 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -1266,6 +1266,8 @@ int cmd_receive(int argc, char **argv)
}
ret = do_receive(&r, tomnt, realmnt, receive_fd, max_errors);
+ if (receive_fd != fileno(stdin))
+ close(receive_fd);
out: