summaryrefslogtreecommitdiff
path: root/btrfs-map-logical.c
diff options
context:
space:
mode:
authorArne Jansen <sensille@gmx.net>2011-03-14 12:57:49 +0100
committerChris Mason <chris.mason@oracle.com>2011-10-25 09:18:58 -0400
commit48d29930ed29bc92ac5ea08cb72553896d2f7da5 (patch)
tree361aaacd549a7a0932e4086fee05b003006df173 /btrfs-map-logical.c
parent925ac325185d56e69343c5775765f7cf94238b31 (diff)
btrfs-map-logical: segfaults when no output file is given
when no output file is given, info_file stays NULL and the following fprintf segfaults. Default to stdout. Signed-off-by: Arne Jansen <sensille@gmx.net> Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Diffstat (limited to 'btrfs-map-logical.c')
-rw-r--r--btrfs-map-logical.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c
index 6d3ef7ab..d79a73a9 100644
--- a/btrfs-map-logical.c
+++ b/btrfs-map-logical.c
@@ -173,6 +173,7 @@ int main(int ac, char **av)
exit(1);
}
+ info_file = stdout;
if (output_file) {
if (strcmp(output_file, "-") == 0) {
out_fd = 1;