summaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
authorRob Landley2006-05-17 04:09:14 +0000
committerRob Landley2006-05-17 04:09:14 +0000
commit5371a953caaa3c7beb04377fbdbe15f0aad2bd32 (patch)
treefd511ddfa648f747c733161d336777a909ac6778 /debianutils
parent2686d3bc38dd1b296c4191160bd4336c0ed11388 (diff)
downloadbusybox-5371a953caaa3c7beb04377fbdbe15f0aad2bd32.zip
busybox-5371a953caaa3c7beb04377fbdbe15f0aad2bd32.tar.gz
The gnu extension to have realpath() malloc its buffer when handed a NULL
isn't implemented in uClibc, so we can't use it.
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/readlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/debianutils/readlink.c b/debianutils/readlink.c
index 83abdbf..79f0870 100644
--- a/debianutils/readlink.c
+++ b/debianutils/readlink.c
@@ -25,7 +25,7 @@ int readlink_main(int argc, char **argv)
bb_show_usage();
if (opt & READLINK_FLAG_f)
- buf = realpath(argv[optind], NULL);
+ buf = realpath(argv[optind], bb_common_bufsiz1);
else
buf = xreadlink(argv[ENABLE_FEATURE_READLINK_FOLLOW ? optind : 1]);
@@ -33,7 +33,7 @@ int readlink_main(int argc, char **argv)
return EXIT_FAILURE;
puts(buf);
- if (ENABLE_FEATURE_CLEAN_UP) free(buf);
+ if (ENABLE_FEATURE_CLEAN_UP && buf != bb_common_bufsiz1) free(buf);
return EXIT_SUCCESS;
}