btrfs-progs: close fd in inode resolve

Signed-off-by: Zach Brown <zab@redhat.com>
master
Zach Brown 2013-01-24 10:45:00 -08:00
parent 065fa46f5d
commit df13b84670
1 changed files with 6 additions and 2 deletions

View File

@ -85,6 +85,7 @@ static int cmd_inode_resolve(int argc, char **argv)
{
int fd;
int verbose = 0;
int ret;
optind = 1;
while (1) {
@ -110,8 +111,11 @@ static int cmd_inode_resolve(int argc, char **argv)
return 12;
}
return __ino_to_path_fd(atoll(argv[optind]), fd, verbose,
argv[optind+1]);
ret = __ino_to_path_fd(atoll(argv[optind]), fd, verbose,
argv[optind+1]);
close(fd);
return ret;
}
static const char * const cmd_logical_resolve_usage[] = {