aboutsummaryrefslogtreecommitdiff
path: root/readlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'readlink.c')
-rw-r--r--readlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/readlink.c b/readlink.c
index 226649544..c46ebd108 100644
--- a/readlink.c
+++ b/readlink.c
@@ -37,6 +37,8 @@ int readlink_main(int argc, char **argv)
show_usage();
buf = xreadlink(argv[1]);
+ if (!buf)
+ return EXIT_FAILURE;
puts(buf);
#ifdef BB_FEATURE_CLEAN_UP
free(buf);