diff options
author | Gui Hecheng <guihc.fnst@cn.fujitsu.com> | 2014-03-13 13:01:30 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-03-21 09:51:31 -0700 |
commit | c543daa68bfe183149ac2a9446da92577f02ae03 (patch) | |
tree | 96770b92944898879409595926a62a280a2d3341 /volumes.c | |
parent | a2524a784dbf0ad270169292a7a3f181d3884f61 (diff) |
btrfs-progs: fix bug on mkfs with relative path specified
The bug accurs when exec:
# mkfs.btrfs -r <a relative path> <device>
(note: the path should be 'valid' correspond to your `pwd`)
error msg:
$ scandir for <a relative path> failed: No such file...
o Replace strdup() with realpath() to get the correct scan path.
o fix memory leaks and adopt the "single return + goto out" pattern
Reported-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'volumes.c')
0 files changed, 0 insertions, 0 deletions