projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
065fa46
)
btrfs-progs: close fd in inode resolve
author
Zach Brown
<zab@redhat.com>
Thu, 24 Jan 2013 18:45:00 +0000
(10:45 -0800)
committer
Zach Brown
<zab@redhat.com>
Wed, 6 Feb 2013 00:09:40 +0000
(16:09 -0800)
Signed-off-by: Zach Brown <zab@redhat.com>
cmds-inspect.c
patch
|
blob
|
history
diff --git
a/cmds-inspect.c
b/cmds-inspect.c
index
f10bf55
..
4347c1a
100644
(file)
--- a/
cmds-inspect.c
+++ b/
cmds-inspect.c
@@
-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[] = {